@@ -686,15 +686,9 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
686
686
if (childIndex < 0 ) return null ;
687
687
return childIndex;
688
688
},
689
- childCount: bottomItems + 3 ,
689
+ childCount: bottomItems + 1 ,
690
690
(context, childIndex) {
691
- // To reinforce that the end of the feed has been reached:
692
- // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
693
- if (childIndex == bottomItems + 2 ) return const SizedBox (height: 36 );
694
-
695
- if (childIndex == bottomItems + 1 ) return MarkAsReadWidget (narrow: widget.narrow);
696
-
697
- if (childIndex == bottomItems) return TypingStatusWidget (narrow: widget.narrow);
691
+ if (childIndex == bottomItems) return _buildEndCap ();
698
692
699
693
final itemIndex = topItems + childIndex;
700
694
final data = model.items[itemIndex];
@@ -743,6 +737,16 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
743
737
};
744
738
}
745
739
740
+ Widget _buildEndCap () {
741
+ return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
742
+ TypingStatusWidget (narrow: widget.narrow),
743
+ MarkAsReadWidget (narrow: widget.narrow),
744
+ // To reinforce that the end of the feed has been reached:
745
+ // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
746
+ const SizedBox (height: 36 ),
747
+ ]);
748
+ }
749
+
746
750
Widget _buildItem (MessageListItem data) {
747
751
switch (data) {
748
752
case MessageListRecipientHeaderItem ():
0 commit comments