WIP: Add settings page #46

Draft
Henry-Hiles wants to merge 11 commits from settings-page into main
Showing only changes of commit 6ed01cf61b - Show all commits

mobile settings mockup

Henry Hiles 2026-06-26 14:17:31 -04:00
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -1,6 +1,8 @@
import "package:flutter/material.dart"; import "package:flutter/material.dart";
import "package:flutter_riverpod/flutter_riverpod.dart"; import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:m3e_card_list/m3e_card_list.dart";
import "package:navigation_rail_m3e/navigation_rail_m3e.dart"; import "package:navigation_rail_m3e/navigation_rail_m3e.dart";
import "package:nexus/widgets/divider_text.dart";
import "package:super_sliver_list/super_sliver_list.dart"; import "package:super_sliver_list/super_sliver_list.dart";
class SettingsPage extends ConsumerWidget { class SettingsPage extends ConsumerWidget {
@ -29,7 +31,44 @@ class SettingsPage extends ConsumerWidget {
), ),
body: Padding( body: Padding(
padding: .symmetric(vertical: 12), padding: .symmetric(vertical: 12),
child: Row( child: categoriesArePages
? CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: Padding(
padding: .symmetric(horizontal: 16),
child: DividerText("Account Settings"),
),
),
SliverM3ECardList(
padding: .symmetric(horizontal: 4, vertical: 8),
margin: .all(12),
color: Theme.of(context).colorScheme.primaryContainer,
itemCount: 3,
itemBuilder: (context, index) => ListTile(
leading: Icon(Icons.abc),
title: Text("Account"),
),
),
SliverToBoxAdapter(
child: Padding(
padding: .symmetric(horizontal: 16),
child: DividerText("Some Other Settings"),
),
),
SliverM3ECardList(
padding: .symmetric(horizontal: 4, vertical: 8),
margin: .symmetric(horizontal: 12),
color: Theme.of(context).colorScheme.primaryContainer,
itemCount: 4,
itemBuilder: (context, index) => ListTile(
leading: Icon(Icons.abc),
title: Text("Account"),
),
),
],
)
: Row(
children: [ children: [
Padding( Padding(
padding: .symmetric(vertical: 8), padding: .symmetric(vertical: 8),
@ -37,11 +76,16 @@ class SettingsPage extends ConsumerWidget {
type: .alwaysExpand, type: .alwaysExpand,
sections: [ sections: [
.new( .new(
header: DividerText("Account Settings"),
destinations: [ destinations: [
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
.new(icon: Icon(Icons.abc), label: "Account"), ],
),
.new(
header: DividerText("Some Other Settings"),
destinations: [
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
.new(icon: Icon(Icons.abc), label: "Account"), .new(icon: Icon(Icons.abc), label: "Account"),
@ -61,6 +105,26 @@ class SettingsPage extends ConsumerWidget {
value: false, value: false,
onChanged: (value) {}, onChanged: (value) {},
), ),
SwitchListTile(
title: Text("Settings Title"),
value: false,
onChanged: (value) {},
),
SwitchListTile(
title: Text("Settings Title"),
value: false,
onChanged: (value) {},
),
SwitchListTile(
title: Text("Settings Title"),
value: false,
onChanged: (value) {},
),
SwitchListTile(
title: Text("Settings Title"),
value: false,
onChanged: (value) {},
),
], ],
), ),
), ),