refactor(ui, core): Deprecate v3

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-03-10 14:12:01 +05:30
committed by xsahil03x
parent 55b87295ab
commit a7e3839256
128 changed files with 3891 additions and 1362 deletions
@@ -2,21 +2,26 @@ import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/extension.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
///
/// {@macro user_item}
@Deprecated("Use 'StreamUserItem' instead")
typedef UserItem = StreamUserItem;
/// {@template user_item}
/// It shows the current [User] preview.
///
/// The widget uses a [StreamBuilder] to render the user information
/// image as soon as it updates.
///
/// Usually you don't use this widget as it's the default user preview used
/// by [UserListView].
/// by [StreamUserListView].
///
/// The widget renders the ui based on the first ancestor of type
/// [StreamChatTheme].
/// Modify it to change the widget appearance.
class UserItem extends StatelessWidget {
/// {@endtemplate}
class StreamUserItem extends StatelessWidget {
/// Instantiate a new UserItem
const UserItem({
const StreamUserItem({
Key? key,
required this.user,
this.onTap,
@@ -38,10 +43,10 @@ class UserItem extends StatelessWidget {
/// The function called when the image is tapped
final void Function(User)? onImageTap;
/// If true the [UserItem] will show a trailing checkmark
/// If true the [StreamUserItem] will show a trailing checkmark
final bool selected;
/// If true the [UserItem] will show the last seen
/// If true the [StreamUserItem] will show the last seen
final bool showLastOnline;
@override
@@ -58,7 +63,7 @@ class UserItem extends StatelessWidget {
onLongPress!(user);
}
},
leading: UserAvatar(
leading: StreamUserAvatar(
user: user,
onTap: (user) {
if (onImageTap != null) {