Skip to content

Commit c401f93

Browse files
committed
subscription_list [nfc]: Remove unneeded [Center]
I think this isn't necessary; the child will expand out as far as the parent constraints allow, so a centered alignment isn't different from any other kind of alignment.
1 parent 7026744 commit c401f93

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

lib/widgets/subscription_list.dart

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,24 @@ class _SubscriptionListPageState extends State<SubscriptionListPage> with PerAcc
8282

8383
return Scaffold(
8484
appBar: AppBar(title: const Text("Streams")),
85-
body: Center(
86-
child: CustomScrollView(
87-
slivers: [
88-
if (pinned.isEmpty && unpinned.isEmpty)
89-
const _NoSubscriptionsItem(),
90-
if (pinned.isNotEmpty) ...[
91-
const _SubscriptionListHeader(label: "Pinned"),
92-
_SubscriptionList(unreadsModel: unreadsModel, subscriptions: pinned),
93-
],
94-
if (unpinned.isNotEmpty) ...[
95-
const _SubscriptionListHeader(label: "Unpinned"),
96-
_SubscriptionList(unreadsModel: unreadsModel, subscriptions: unpinned),
97-
],
98-
99-
// TODO(#188): add button leading to "All Streams" page with ability to subscribe
100-
101-
// This ensures last item in scrollable can settle in an unobstructed area.
102-
const SliverSafeArea(sliver: SliverToBoxAdapter(child: SizedBox.shrink())),
103-
])));
85+
body: CustomScrollView(
86+
slivers: [
87+
if (pinned.isEmpty && unpinned.isEmpty)
88+
const _NoSubscriptionsItem(),
89+
if (pinned.isNotEmpty) ...[
90+
const _SubscriptionListHeader(label: "Pinned"),
91+
_SubscriptionList(unreadsModel: unreadsModel, subscriptions: pinned),
92+
],
93+
if (unpinned.isNotEmpty) ...[
94+
const _SubscriptionListHeader(label: "Unpinned"),
95+
_SubscriptionList(unreadsModel: unreadsModel, subscriptions: unpinned),
96+
],
97+
98+
// TODO(#188): add button leading to "All Streams" page with ability to subscribe
99+
100+
// This ensures last item in scrollable can settle in an unobstructed area.
101+
const SliverSafeArea(sliver: SliverToBoxAdapter(child: SizedBox.shrink())),
102+
]));
104103
}
105104
}
106105

0 commit comments

Comments
 (0)