From eaa3ef0959515bd27e2445637839d320adb7582c Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 8 Jan 2021 14:21:38 +0530 Subject: [PATCH] feat: Added typing indicator design and styling fixes --- example/lib/main.dart | 6 ++++++ lib/src/typing_indicator.dart | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 6df1dafb..2bf460f8 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -578,6 +578,12 @@ class _ChannelPageState extends State { horizontal: 8, vertical: 4, ), + style: StreamChatTheme.of(context) + .textTheme + .footnote + .copyWith( + color: + StreamChatTheme.of(context).colorTheme.grey), ), ), ), diff --git a/lib/src/typing_indicator.dart b/lib/src/typing_indicator.dart index b13eade6..177e9e21 100644 --- a/lib/src/typing_indicator.dart +++ b/lib/src/typing_indicator.dart @@ -54,7 +54,7 @@ class TypingIndicator extends StatelessWidget { height: 4, ), Text( - ' ${snapshot.data.map((u) => u.name).join(',')} ${snapshot.data.length == 1 ? 'is' : 'are'} typing', + ' ${snapshot.data[0].name}${snapshot.data.length == 1 ? '' : ' and ${snapshot.data.length - 1} more'} ${snapshot.data.length == 1 ? 'is' : 'are'} typing', maxLines: 1, style: style, ),