@@ -297,6 +297,7 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
297
297
builder: (BuildContext context) => Column (
298
298
// Children are expected to take the full horizontal space
299
299
// and handle the horizontal device insets.
300
+ // The bottom inset should be handled by the last child only.
300
301
children: [
301
302
MediaQuery .removePadding (
302
303
// Scaffold knows about the app bar, and so has run this
@@ -438,6 +439,8 @@ const kFetchMessagesBufferPixels = (kMessageListFetchBatchSize / 2) * _kShortMes
438
439
///
439
440
/// Takes the full screen width, keeping its contents
440
441
/// out of the horizontal insets with transparent [SafeArea] padding.
442
+ /// When there is no [ComposeBox] , also takes responsibility
443
+ /// for dealing with the bottom inset.
441
444
class MessageList extends StatefulWidget {
442
445
const MessageList ({super .key, required this .narrow, required this .onNarrowChanged});
443
446
@@ -551,7 +554,9 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
551
554
bottom: 0 ,
552
555
right: 0 ,
553
556
// TODO(#311) SafeArea shouldn't be needed if we have a
554
- // bottom nav. That will pad the bottom inset.
557
+ // bottom nav; that will pad the bottom inset. Remove it,
558
+ // and the mention of bottom-inset handling in
559
+ // MessageList's dartdoc.
555
560
child: SafeArea (
556
561
child: ScrollToBottomButton (
557
562
scrollController: scrollController,
@@ -602,8 +607,8 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
602
607
}));
603
608
604
609
if (! ComposeBox .hasComposeBox (widget.narrow)) {
605
- // TODO(#311) If we have a bottom nav, it will pad the bottom
606
- // inset, and this shouldn't be necessary
610
+ // TODO(#311) If we have a bottom nav, it will pad the bottom inset,
611
+ // and this can be removed; also remove mention in MessageList dartdoc
607
612
sliver = SliverSafeArea (sliver: sliver);
608
613
}
609
614
0 commit comments