update channel preview
This commit is contained in:
@@ -42,6 +42,7 @@ class ChannelName extends StatelessWidget {
|
|||||||
return Text(
|
return Text(
|
||||||
title,
|
title,
|
||||||
style: textStyle,
|
style: textStyle,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -56,20 +56,31 @@ class ChannelPreview extends StatelessWidget {
|
|||||||
leading: ChannelImage(
|
leading: ChannelImage(
|
||||||
onTap: onImageTap,
|
onTap: onImageTap,
|
||||||
),
|
),
|
||||||
title: ChannelName(
|
title: Row(
|
||||||
textStyle: StreamChatTheme.of(context).channelPreviewTheme.title,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
),
|
|
||||||
subtitle: _buildSubtitle(context),
|
|
||||||
trailing: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_buildDate(context),
|
Flexible(
|
||||||
|
child: ChannelName(
|
||||||
|
textStyle: StreamChatTheme.of(context).channelPreviewTheme.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
if (channel.state.unreadCount > 0)
|
if (channel.state.unreadCount > 0)
|
||||||
UnreadIndicator(
|
UnreadIndicator(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
subtitle: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Flexible(child: _buildSubtitle(context)),
|
||||||
|
_buildDate(context),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
trailing: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class StreamChatThemeData {
|
|||||||
color: isDark ? Colors.white : Colors.black,
|
color: isDark ? Colors.white : Colors.black,
|
||||||
),
|
),
|
||||||
subtitle: TextStyle(
|
subtitle: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 12.5,
|
||||||
color: isDark ? Colors.white : Colors.black,
|
color: isDark ? Colors.white : Colors.black,
|
||||||
),
|
),
|
||||||
lastMessageAt: TextStyle(
|
lastMessageAt: TextStyle(
|
||||||
|
|||||||
Reference in New Issue
Block a user