refactor(ui, core): Deprecate v3
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
+4
-4
@@ -131,7 +131,7 @@ class StreamChannelListTile extends StatelessWidget {
|
||||
final channelState = channel.state!;
|
||||
final currentUser = channel.client.state.currentUser!;
|
||||
|
||||
final channelPreviewTheme = ChannelPreviewTheme.of(context);
|
||||
final channelPreviewTheme = StreamChannelPreviewTheme.of(context);
|
||||
|
||||
final leading = this.leading ??
|
||||
StreamChannelAvatar(
|
||||
@@ -182,7 +182,7 @@ class StreamChannelListTile extends StatelessWidget {
|
||||
return const Offstage();
|
||||
}
|
||||
return unreadIndicatorBuilder?.call(context) ??
|
||||
UnreadIndicator(cid: channel.cid);
|
||||
StreamUnreadIndicator(cid: channel.cid);
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -213,7 +213,7 @@ class StreamChannelListTile extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child:
|
||||
sendingIndicatorBuilder?.call(context, lastMessage) ??
|
||||
SendingIndicator(
|
||||
StreamSendingIndicator(
|
||||
message: lastMessage,
|
||||
size: channelPreviewTheme.indicatorIconSize,
|
||||
isMessageRead: channelState
|
||||
@@ -318,7 +318,7 @@ class ChannelListTileSubtitle extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
}
|
||||
return TypingIndicator(
|
||||
return StreamTypingIndicator(
|
||||
channel: channel,
|
||||
style: textStyle,
|
||||
alternativeWidget: ChannelLastMessageText(
|
||||
|
||||
@@ -148,7 +148,7 @@ class StreamChannelAvatar extends StatelessWidget {
|
||||
return BetterStreamBuilder<User>(
|
||||
stream: client.currentUserStream.map((it) => it!),
|
||||
initialData: currentUser,
|
||||
builder: (context, user) => UserAvatar(
|
||||
builder: (context, user) => StreamUserAvatar(
|
||||
borderRadius: borderRadius ?? previewTheme?.borderRadius,
|
||||
user: user,
|
||||
constraints: constraints ?? previewTheme?.constraints,
|
||||
@@ -171,7 +171,7 @@ class StreamChannelAvatar extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
initialData: member,
|
||||
builder: (context, member) => UserAvatar(
|
||||
builder: (context, member) => StreamUserAvatar(
|
||||
borderRadius: borderRadius ?? previewTheme?.borderRadius,
|
||||
user: member.user!,
|
||||
constraints: constraints ?? previewTheme?.constraints,
|
||||
@@ -184,7 +184,7 @@ class StreamChannelAvatar extends StatelessWidget {
|
||||
}
|
||||
|
||||
// Group conversation
|
||||
return GroupAvatar(
|
||||
return StreamGroupAvatar(
|
||||
channel: channel,
|
||||
members: otherMembers,
|
||||
borderRadius: borderRadius ?? previewTheme?.borderRadius,
|
||||
|
||||
@@ -52,7 +52,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final themeData = StreamChatTheme.of(context);
|
||||
final colorTheme = themeData.colorTheme;
|
||||
final channelPreviewTheme = ChannelPreviewTheme.of(context);
|
||||
final channelPreviewTheme = StreamChannelPreviewTheme.of(context);
|
||||
|
||||
final currentUser = channel.client.state.currentUser;
|
||||
final isOneToOneChannel = channel.isDistinct && channel.memberCount == 2;
|
||||
@@ -84,7 +84,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Center(
|
||||
// TODO: Refactor ChannelInfo
|
||||
child: ChannelInfo(
|
||||
child: StreamChannelInfo(
|
||||
showTypingIndicator: false,
|
||||
channel: channel,
|
||||
textStyle: channelPreviewTheme.subtitleStyle,
|
||||
@@ -105,7 +105,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
final user = member.user!;
|
||||
return Column(
|
||||
children: [
|
||||
UserAvatar(
|
||||
StreamUserAvatar(
|
||||
user: user,
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 64,
|
||||
@@ -132,7 +132,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
OptionListTile(
|
||||
StreamOptionListTile(
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: StreamSvgIcon.user(
|
||||
@@ -143,7 +143,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
onTap: onViewInfoTap,
|
||||
),
|
||||
if (!isOneToOneChannel)
|
||||
OptionListTile(
|
||||
StreamOptionListTile(
|
||||
title: context.translations.leaveGroupLabel,
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -154,7 +154,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
onTap: onLeaveChannelTap,
|
||||
),
|
||||
if (isOwner)
|
||||
OptionListTile(
|
||||
StreamOptionListTile(
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: StreamSvgIcon.delete(
|
||||
@@ -165,7 +165,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
titleColor: colorTheme.accentError,
|
||||
onTap: onDeleteConversationTap,
|
||||
),
|
||||
OptionListTile(
|
||||
StreamOptionListTile(
|
||||
leading: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: StreamSvgIcon.closeSmall(
|
||||
|
||||
Reference in New Issue
Block a user