mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-22 06:08:54 -04:00
updates and cleanup
This commit is contained in:
parent
6bd60207d8
commit
ef1ded4494
11 changed files with 142 additions and 108 deletions
|
@ -31,34 +31,42 @@ class SettingsPageState extends State<SettingsPage> {
|
|||
@override
|
||||
Widget build(BuildContext context) =>
|
||||
AsyncBlocBuilder<PreferencesCubit, Preferences>(
|
||||
builder: (context, state) => StyledScaffold(
|
||||
appBar: DefaultAppBar(
|
||||
title: Text(translate('settings_page.titlebar')),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => GoRouterHelper(context).pop(),
|
||||
),
|
||||
actions: <Widget>[
|
||||
const SignalStrengthMeterWidget().paddingLTRB(16, 0, 16, 0),
|
||||
]),
|
||||
body: ThemeSwitchingArea(
|
||||
child: FormBuilder(
|
||||
key: _formKey,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(8),
|
||||
children: [
|
||||
buildSettingsPageColorPreferences(
|
||||
builder: (context, state) => ThemeSwitcher.withTheme(
|
||||
builder: (_, switcher, theme) => StyledScaffold(
|
||||
appBar: DefaultAppBar(
|
||||
title: Text(translate('settings_page.titlebar')),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () => GoRouterHelper(context).pop(),
|
||||
),
|
||||
actions: <Widget>[
|
||||
const SignalStrengthMeterWidget()
|
||||
.paddingLTRB(16, 0, 16, 0),
|
||||
]),
|
||||
body: ThemeSwitchingArea(
|
||||
child: FormBuilder(
|
||||
key: _formKey,
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.all(8),
|
||||
children: [
|
||||
buildSettingsPageColorPreferences(
|
||||
context: context,
|
||||
switcher: switcher,
|
||||
onChanged: () => setState(() {}))
|
||||
.paddingLTRB(0, 8, 0, 0),
|
||||
buildSettingsPageBrightnessPreferences(
|
||||
context: context,
|
||||
onChanged: () => setState(() {}))
|
||||
.paddingLTRB(0, 8, 0, 0),
|
||||
buildSettingsPageBrightnessPreferences(
|
||||
context: context, onChanged: () => setState(() {})),
|
||||
buildSettingsPageWallpaperPreferences(
|
||||
context: context, onChanged: () => setState(() {})),
|
||||
buildSettingsPageNotificationPreferences(
|
||||
context: context, onChanged: () => setState(() {})),
|
||||
].map((x) => x.paddingLTRB(0, 0, 0, 8)).toList(),
|
||||
),
|
||||
).paddingSymmetric(horizontal: 8, vertical: 8),
|
||||
)));
|
||||
switcher: switcher,
|
||||
onChanged: () => setState(() {})),
|
||||
buildSettingsPageWallpaperPreferences(
|
||||
context: context,
|
||||
switcher: switcher,
|
||||
onChanged: () => setState(() {})),
|
||||
buildSettingsPageNotificationPreferences(
|
||||
context: context,
|
||||
onChanged: () => setState(() {})),
|
||||
].map((x) => x.paddingLTRB(0, 0, 0, 8)).toList(),
|
||||
),
|
||||
).paddingSymmetric(horizontal: 8, vertical: 8),
|
||||
))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue