Fix searchbar appearing once per category on thin screens

This commit is contained in:
Henry Hiles 2026-06-26 16:21:45 -04:00
commit 1a2f40d144
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -72,15 +72,16 @@ class SettingsPage extends ConsumerWidget {
), ),
body: categoriesArePages body: categoriesArePages
? CustomScrollView( ? CustomScrollView(
slivers: settingsCategoryGroups slivers: [
.mapTo(
(categoryGroup, categories) => [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: EdgeInsets.all(12).copyWith(bottom: 4), padding: EdgeInsets.all(12).copyWith(bottom: 4),
child: searchBar, child: searchBar,
), ),
), ),
...settingsCategoryGroups
.mapTo(
(categoryGroup, categories) => [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@ -113,7 +114,8 @@ class SettingsPage extends ConsumerWidget {
), ),
], ],
) )
.flattenedToList, .flattened,
],
) )
: Row( : Row(
children: [ children: [