Only 4 mentions allowed at a time

This commit is contained in:
Deven Joshi
2021-01-07 14:33:35 +05:30
parent f3aefdaf8b
commit e05033cce3
+9 -2
View File
@@ -1153,7 +1153,7 @@ class MessageInputState extends State<MessageInput> {
), ),
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: Container( child: Container(
constraints: BoxConstraints.loose(Size.fromHeight(400)), constraints: BoxConstraints.loose(Size.fromHeight(240)),
decoration: BoxDecoration( decoration: BoxDecoration(
color: StreamChatTheme.of(context).colorTheme.white, color: StreamChatTheme.of(context).colorTheme.white,
), ),
@@ -1164,6 +1164,7 @@ class MessageInputState extends State<MessageInput> {
return ListView( return ListView(
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
shrinkWrap: true, shrinkWrap: true,
itemExtent: 58.0,
children: snapshot.data children: snapshot.data
.map((m) => ListTile( .map((m) => ListTile(
leading: UserAvatar( leading: UserAvatar(
@@ -1177,10 +1178,16 @@ class MessageInputState extends State<MessageInput> {
), ),
title: Text( title: Text(
'${m.user.name}', '${m.user.name}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
subtitle: Text('@${m.userId}'), subtitle: Text(
'@${m.userId}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
trailing: StreamSvgIcon.mentions( trailing: StreamSvgIcon.mentions(
color: StreamChatTheme.of(context) color: StreamChatTheme.of(context)
.colorTheme .colorTheme