From e05033cce31db365ace0560a4a71f9755f972093 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Thu, 7 Jan 2021 14:33:35 +0530 Subject: [PATCH] Only 4 mentions allowed at a time --- lib/src/message_input.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index 52d91d45..cabbafec 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -1153,7 +1153,7 @@ class MessageInputState extends State { ), clipBehavior: Clip.antiAlias, child: Container( - constraints: BoxConstraints.loose(Size.fromHeight(400)), + constraints: BoxConstraints.loose(Size.fromHeight(240)), decoration: BoxDecoration( color: StreamChatTheme.of(context).colorTheme.white, ), @@ -1164,6 +1164,7 @@ class MessageInputState extends State { return ListView( padding: const EdgeInsets.all(0), shrinkWrap: true, + itemExtent: 58.0, children: snapshot.data .map((m) => ListTile( leading: UserAvatar( @@ -1177,10 +1178,16 @@ class MessageInputState extends State { ), title: Text( '${m.user.name}', + maxLines: 1, + overflow: TextOverflow.ellipsis, style: TextStyle( fontWeight: FontWeight.bold), ), - subtitle: Text('@${m.userId}'), + subtitle: Text( + '@${m.userId}', + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), trailing: StreamSvgIcon.mentions( color: StreamChatTheme.of(context) .colorTheme