Skip to content

Commit c1f6b8d

Browse files
committed
msglist [nfc]: Make trailingWhitespace a constant
This 11px whitespace can be traced back to 311d4d5 in 2022. While this is not present in the Figma design, it would be a good idea to refine it in the future. See discussion: #1453 (comment)
1 parent 61e343b commit c1f6b8d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/widgets/message_list.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,6 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
718718
return MessageItem(
719719
key: ValueKey(data.message.id),
720720
header: header,
721-
trailingWhitespace: 11,
722721
item: data);
723722
}
724723
}
@@ -1017,12 +1016,10 @@ class MessageItem extends StatelessWidget {
10171016
super.key,
10181017
required this.item,
10191018
required this.header,
1020-
this.trailingWhitespace,
10211019
});
10221020

10231021
final MessageListMessageBaseItem item;
10241022
final Widget header;
1025-
final double? trailingWhitespace;
10261023

10271024
@override
10281025
Widget build(BuildContext context) {
@@ -1035,7 +1032,9 @@ class MessageItem extends StatelessWidget {
10351032
switch (item) {
10361033
MessageListMessageItem() => MessageWithPossibleSender(item: item),
10371034
},
1038-
if (trailingWhitespace != null && item.isLastInBlock) SizedBox(height: trailingWhitespace!),
1035+
// TODO refine this padding; discussion:
1036+
// https://github.com/zulip/zulip-flutter/pull/1453#discussion_r2106526985
1037+
if (item.isLastInBlock) const SizedBox(height: 11),
10391038
]));
10401039
if (item case MessageListMessageItem(:final message)) {
10411040
child = _UnreadMarker(

0 commit comments

Comments
 (0)