Skip to content

Commit 742320c

Browse files
chrisbobbegnprice
authored andcommitted
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 04af371 commit 742320c

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

lib/widgets/inbox.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ class _InboxPageState extends State<InboxPageBody> with PerAccountStoreAwareStat
168168
message: zulipLocalizations.inboxEmptyPlaceholder);
169169
}
170170

171-
return SafeArea(
172-
// Don't pad the bottom here; we want the list content to do that.
173-
bottom: false,
171+
return SafeArea( // horizontal insets
174172
child: StickyHeaderListView.builder(
175173
itemCount: sections.length,
176174
itemBuilder: (context, index) {

lib/widgets/recent_dm_conversations.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ class _RecentDmConversationsPageBodyState extends State<RecentDmConversationsPag
6464
PageBodyEmptyContentPlaceholder(
6565
message: zulipLocalizations.recentDmConversationsEmptyPlaceholder)
6666
else
67-
SafeArea(
68-
// Don't pad the bottom here; we want the list content to do that.
69-
bottom: false,
67+
SafeArea( // horizontal insets
7068
child: ListView.builder(
7169
padding: EdgeInsets.only(bottom: 90),
7270
itemCount: sorted.length,

lib/widgets/subscription_list.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ class _SubscriptionListPageBodyState extends State<SubscriptionListPageBody> wit
101101
message: zulipLocalizations.channelsEmptyPlaceholder);
102102
}
103103

104-
return SafeArea(
105-
// Don't pad the bottom here; we want the list content to do that.
106-
bottom: false,
104+
return SafeArea( // horizontal insets
107105
child: CustomScrollView(
108106
slivers: [
109107
if (pinned.isNotEmpty) ...[
@@ -116,9 +114,6 @@ class _SubscriptionListPageBodyState extends State<SubscriptionListPageBody> wit
116114
],
117115

118116
// TODO(#188): add button leading to "All Streams" page with ability to subscribe
119-
120-
// This ensures last item in scrollable can settle in an unobstructed area.
121-
const SliverSafeArea(sliver: SliverToBoxAdapter(child: SizedBox.shrink())),
122117
]));
123118
}
124119
}

0 commit comments

Comments
 (0)