Skip to content

Commit 53edaad

Browse files
committed
msglist: Update message sender style and layout
1 parent 8cf5f60 commit 53edaad

File tree

1 file changed

+23
-16
lines changed

1 file changed

+23
-16
lines changed

lib/widgets/message_list.dart

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -855,23 +855,30 @@ class MessageWithPossibleSender extends StatelessWidget {
855855

856856
final Widget? senderRow = item.showSender
857857
? Row(
858+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
859+
crossAxisAlignment: CrossAxisAlignment.baseline,
860+
textBaseline: TextBaseline.alphabetic,
858861
children: [
859-
GestureDetector(
860-
onTap: () => Navigator.push(context,
861-
ProfilePage.buildRoute(context: context,
862-
userId: message.senderId)),
863-
child: Row(
864-
children: [
865-
Avatar(size: 35, borderRadius: 4,
866-
userId: message.senderId),
867-
Text(message.senderFullName, // TODO get from user data
868-
style: const TextStyle(
869-
fontFamily: 'Source Sans 3',
870-
fontSize: 18,
871-
height: (22 / 18),
872-
).merge(weightVariableTextStyle(context, wght: 600,
873-
wghtIfPlatformRequestsBold: 900))),
874-
])),
862+
Flexible(
863+
child: GestureDetector(
864+
onTap: () => Navigator.push(context,
865+
ProfilePage.buildRoute(context: context,
866+
userId: message.senderId)),
867+
child: Row(
868+
children: [
869+
Avatar(size: 32, borderRadius: 3,
870+
userId: message.senderId),
871+
const SizedBox(width: 8),
872+
Flexible(
873+
child: Text(message.senderFullName, // TODO get from user data
874+
style: const TextStyle(
875+
fontFamily: 'Source Sans 3',
876+
fontSize: 18,
877+
height: (22 / 18),
878+
).merge(weightVariableTextStyle(context, wght: 600,
879+
wghtIfPlatformRequestsBold: 900)),
880+
overflow: TextOverflow.ellipsis)),
881+
]))),
875882
Text(
876883
_kMessageTimestampFormat.format(
877884
DateTime.fromMillisecondsSinceEpoch(1000 * message.timestamp)),

0 commit comments

Comments
 (0)