fix wrong settings categories opening when multiple sections exist
This commit is contained in:
parent
87e1ef0d9b
commit
80b938c0be
1 changed files with 10 additions and 3 deletions
|
|
@ -127,13 +127,13 @@ class SettingsPage extends ConsumerWidget {
|
|||
),
|
||||
...sections
|
||||
.mapTo(
|
||||
(categoryGroup, categories) => [
|
||||
(section, categories) => [
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
).copyWith(bottom: 4),
|
||||
child: DividerText(categoryGroup),
|
||||
child: DividerText(section),
|
||||
),
|
||||
),
|
||||
SliverM3ECardList(
|
||||
|
|
@ -150,7 +150,14 @@ class SettingsPage extends ConsumerWidget {
|
|||
Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
SettingsCategoryPage(index),
|
||||
SettingsCategoryPage(
|
||||
sections
|
||||
.values
|
||||
.flattenedToList
|
||||
.indexOf(
|
||||
categories[index],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
itemBuilder: (context, index) => ListTile(
|
||||
|
|
|
|||
Loading…
Reference in a new issue