@@ -297,6 +297,7 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
297297 builder: (BuildContext context) => Column (
298298 // Children are expected to take the full horizontal space
299299 // and handle the horizontal device insets.
300+ // The bottom inset should be handled by the last child only.
300301 children: [
301302 MediaQuery .removePadding (
302303 // Scaffold knows about the app bar, and so has run this
@@ -438,6 +439,8 @@ const kFetchMessagesBufferPixels = (kMessageListFetchBatchSize / 2) * _kShortMes
438439///
439440/// Takes the full screen width, keeping its contents
440441/// 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.
441444class MessageList extends StatefulWidget {
442445 const MessageList ({super .key, required this .narrow, required this .onNarrowChanged});
443446
@@ -551,7 +554,9 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
551554 bottom: 0 ,
552555 right: 0 ,
553556 // 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.
555560 child: SafeArea (
556561 child: ScrollToBottomButton (
557562 scrollController: scrollController,
@@ -602,8 +607,8 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
602607 }));
603608
604609 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
607612 sliver = SliverSafeArea (sliver: sliver);
608613 }
609614
0 commit comments