@@ -645,15 +645,9 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
645
645
if (childIndex < 0 ) return null ;
646
646
return childIndex;
647
647
},
648
- childCount: bottomItems + 3 ,
648
+ childCount: bottomItems + 1 ,
649
649
(context, childIndex) {
650
- // To reinforce that the end of the feed has been reached:
651
- // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
652
- if (childIndex == bottomItems + 2 ) return const SizedBox (height: 36 );
653
-
654
- if (childIndex == bottomItems + 1 ) return MarkAsReadWidget (narrow: widget.narrow);
655
-
656
- if (childIndex == bottomItems) return TypingStatusWidget (narrow: widget.narrow);
650
+ if (childIndex == bottomItems) return _buildEndCap ();
657
651
658
652
final itemIndex = topItems + childIndex;
659
653
final data = model.items[itemIndex];
@@ -702,6 +696,16 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
702
696
};
703
697
}
704
698
699
+ Widget _buildEndCap () {
700
+ return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
701
+ TypingStatusWidget (narrow: widget.narrow),
702
+ MarkAsReadWidget (narrow: widget.narrow),
703
+ // To reinforce that the end of the feed has been reached:
704
+ // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
705
+ const SizedBox (height: 36 ),
706
+ ]);
707
+ }
708
+
705
709
Widget _buildItem (MessageListItem data) {
706
710
switch (data) {
707
711
case MessageListRecipientHeaderItem ():
0 commit comments