mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-01-02 16:29:31 +00:00
fix: errors
This commit is contained in:
parent
dc0540467f
commit
32e2be4b95
1 changed files with 47 additions and 37 deletions
|
|
@ -30,46 +30,56 @@ class ThemeSettingsPage extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
tiles: [
|
tiles: [
|
||||||
// choose system , light or dark theme
|
// choose system , light or dark theme
|
||||||
Padding(
|
SettingsTile(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0),
|
title: const Text('Theme Mode'),
|
||||||
child: SegmentedButton<ThemeMode>(
|
description: Padding(
|
||||||
segments: [
|
padding: const EdgeInsets.only(top: 8.0),
|
||||||
ButtonSegment<ThemeMode>(
|
child: SegmentedButton<ThemeMode>(
|
||||||
value: ThemeMode.light,
|
segments: [
|
||||||
icon: Icon(
|
ButtonSegment<ThemeMode>(
|
||||||
themeSettings.themeMode == ThemeMode.light
|
value: ThemeMode.light,
|
||||||
? Icons.check
|
icon: Icon(
|
||||||
: Icons.light_mode,
|
themeSettings.themeMode == ThemeMode.light
|
||||||
|
? Icons.check
|
||||||
|
: Icons.light_mode,
|
||||||
|
),
|
||||||
|
label: const Text('Light'),
|
||||||
),
|
),
|
||||||
label: const Text('Light'),
|
ButtonSegment<ThemeMode>(
|
||||||
),
|
value: ThemeMode.system,
|
||||||
ButtonSegment<ThemeMode>(
|
icon: Icon(
|
||||||
value: ThemeMode.system,
|
themeSettings.themeMode == ThemeMode.system
|
||||||
icon: Icon(
|
? Icons.check
|
||||||
themeSettings.themeMode == ThemeMode.system
|
: Icons.auto_awesome,
|
||||||
? Icons.check
|
),
|
||||||
: Icons.auto_awesome,
|
label: const Text('System'),
|
||||||
),
|
),
|
||||||
label: const Text('System'),
|
ButtonSegment<ThemeMode>(
|
||||||
),
|
value: ThemeMode.dark,
|
||||||
ButtonSegment<ThemeMode>(
|
icon: Icon(
|
||||||
value: ThemeMode.dark,
|
themeSettings.themeMode == ThemeMode.dark
|
||||||
icon: Icon(
|
? Icons.check
|
||||||
themeSettings.themeMode == ThemeMode.dark
|
: Icons.dark_mode,
|
||||||
? Icons.check
|
),
|
||||||
: Icons.dark_mode,
|
label: const Text('Dark'),
|
||||||
),
|
),
|
||||||
label: const Text('Dark'),
|
],
|
||||||
),
|
selected: {themeSettings.themeMode},
|
||||||
],
|
onSelectionChanged: (Set<ThemeMode> newSelection) {
|
||||||
selected: {themeSettings.themeMode},
|
ref.read(appSettingsProvider.notifier).update(
|
||||||
onSelectionChanged: (Set<ThemeMode> newSelection) {
|
appSettings.copyWith.themeSettings(
|
||||||
ref.read(appSettingsProvider.notifier).update(
|
themeMode: newSelection.first,
|
||||||
appSettings.copyWith.themeSettings(
|
),
|
||||||
themeMode: newSelection.first,
|
);
|
||||||
),
|
},
|
||||||
);
|
),
|
||||||
},
|
),
|
||||||
|
leading: Icon(
|
||||||
|
themeSettings.themeMode == ThemeMode.light
|
||||||
|
? Icons.light_mode
|
||||||
|
: themeSettings.themeMode == ThemeMode.dark
|
||||||
|
? Icons.dark_mode
|
||||||
|
: Icons.auto_awesome,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue