@@ -68,18 +68,6 @@ class _MessageListState extends State<MessageList> {
68
68
69
69
// Pad the left and right insets, for small devices in landscape.
70
70
child: SafeArea (
71
- // A non-ancestor (the compose box) pads the bottom inset;
72
- // prevent extra padding here.
73
- // TODO have MessageListPage adjust the MediaQuery so we don't
74
- // have to worry about this here
75
- bottom: false ,
76
-
77
- // A non-ancestor (the app bar) pads the top inset. But no
78
- // need to prevent extra padding with `top: false`, because
79
- // Scaffold, which knows about the app bar, sets `body`'s
80
- // ambient `MediaQueryData.padding` to have `top: 0`:
81
- // https://github.com/flutter/flutter/blob/3.7.0-1.2.pre/packages/flutter/lib/src/material/scaffold.dart#L2778
82
-
83
71
// Keep some padding when there are no horizontal insets,
84
72
// which is usual in portrait mode.
85
73
minimum: const EdgeInsets .symmetric (horizontal: 8 ),
@@ -93,24 +81,6 @@ class _MessageListState extends State<MessageList> {
93
81
final length = model! .messages.length;
94
82
assert (model! .contents.length == length);
95
83
return StickyHeaderListView .builder (
96
- // If the `padding` param is omitted or null, StickyHeaderListView pads
97
- // the content area (the part that moves when you scroll) with
98
- // `MediaQueryData.padding`. It inherits this behavior from
99
- // BoxScrollView:
100
- // https://github.com/flutter/flutter/blob/3.7.0-1.2.pre/packages/flutter/lib/src/widgets/scroll_view.dart#L665-L687
101
- //
102
- // A non-ancestor (the compose box) pads the bottom inset, so the
103
- // ambient `MediaQueryData.padding` might be nonzero. So, prevent double
104
- // padding at the bottom by supplying a `padding` param.
105
- //
106
- // (A non-ancestor, the app bar, pads the top inset, but we don't
107
- // need the remedy of a non-null `padding` for the top because the
108
- // ambient `MediaQueryData.padding` has `top: 0` thanks to Scaffold
109
- // setting that on its `body`, since it knows about the app bar:
110
- // https://github.com/flutter/flutter/blob/3.7.0-1.2.pre/packages/flutter/lib/src/material/scaffold.dart#L2778
111
- // )
112
- padding: const EdgeInsets .all (0 ),
113
-
114
84
itemCount: length,
115
85
// Setting reverse: true means the scroll starts at the bottom.
116
86
// Flipping the indexes (in itemBuilder) means the start/bottom
0 commit comments