Skip to content

Commit 7ca6370

Browse files
committed
home [nfc]: Clean up some dead safe-area code from before bottom-tabs
The responsibility for consuming the bottom inset is now external to all of these *PageBody widgets; it's handled by Scaffold.bottomNavigationBar. So we don't need to forward a bottom-inset value down to descendants (via `SafeArea.bottom: false`), and we don't need to add widgets to pad the bottom inset; the bottom-inset height in all these places is zero.
1 parent 834834b commit 7ca6370

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

lib/widgets/inbox.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,7 @@ class _InboxPageState extends State<InboxPageBody> with PerAccountStoreAwareStat
160160
sections.add(_StreamSectionData(streamId, countInStream, streamHasMention, topicItems));
161161
}
162162

163-
return SafeArea(
164-
// Don't pad the bottom here; we want the list content to do that.
165-
bottom: false,
163+
return SafeArea( // horizontal insets
166164
child: StickyHeaderListView.builder(
167165
itemCount: sections.length,
168166
itemBuilder: (context, index) {

lib/widgets/recent_dm_conversations.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ class _RecentDmConversationsPageBodyState extends State<RecentDmConversationsPag
4949
@override
5050
Widget build(BuildContext context) {
5151
final sorted = model!.sorted;
52-
return SafeArea(
53-
// Don't pad the bottom here; we want the list content to do that.
54-
bottom: false,
52+
return SafeArea( // horizontal insets
5553
child: ListView.builder(
5654
itemCount: sorted.length,
5755
itemBuilder: (context, index) {

lib/widgets/subscription_list.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ class _SubscriptionListPageBodyState extends State<SubscriptionListPageBody> wit
9494
_sortSubs(pinned);
9595
_sortSubs(unpinned);
9696

97-
return SafeArea(
98-
// Don't pad the bottom here; we want the list content to do that.
97+
return SafeArea( // horizontal insets
9998
bottom: false,
10099
child: CustomScrollView(
101100
slivers: [
@@ -111,9 +110,6 @@ class _SubscriptionListPageBodyState extends State<SubscriptionListPageBody> wit
111110
],
112111

113112
// TODO(#188): add button leading to "All Streams" page with ability to subscribe
114-
115-
// This ensures last item in scrollable can settle in an unobstructed area.
116-
const SliverSafeArea(sliver: SliverToBoxAdapter(child: SizedBox.shrink())),
117113
]));
118114
}
119115
}

0 commit comments

Comments
 (0)