From 00e9e796e4dcf17c5a9689ca4de1610e489c6ad1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 21 Oct 2020 10:39:50 +0200 Subject: [PATCH] fix unread indicator --- lib/src/unread_indicator.dart | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/src/unread_indicator.dart b/lib/src/unread_indicator.dart index 96bf0a00..debe1d1b 100644 --- a/lib/src/unread_indicator.dart +++ b/lib/src/unread_indicator.dart @@ -12,17 +12,23 @@ class UnreadIndicator extends StatelessWidget { @override Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.only(left: 8.0), - child: CircleAvatar( - backgroundColor: - StreamChatTheme.of(context).channelPreviewTheme.unreadCounterColor, - radius: 8, - child: Text( - '${channel.state.unreadCount}', - style: TextStyle( - fontSize: 11, - color: Colors.white, + return Material( + borderRadius: BorderRadius.circular(8), + color: StreamChatTheme.of(context).channelPreviewTheme.unreadCounterColor, + child: Padding( + padding: const EdgeInsets.only( + left: 5.0, + right: 5.0, + top: 2, + bottom: 1, + ), + child: Center( + child: Text( + '${channel.state.unreadCount}', + style: TextStyle( + fontSize: 11, + color: Colors.white, + ), ), ), ),