mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-23 03:19:30 +00:00
feat: implement per book settings with player configuration and update methods
This commit is contained in:
parent
fd42ee2343
commit
e7dd4de515
19 changed files with 1030 additions and 20 deletions
|
|
@ -65,7 +65,7 @@ class AppSettingsPage extends HookConsumerWidget {
|
|||
? const Icon(Icons.auto_fix_high)
|
||||
: const Icon(Icons.auto_fix_off),
|
||||
onToggle: (value) {
|
||||
ref.read(appSettingsProvider.notifier).updateState(
|
||||
ref.read(appSettingsProvider.notifier).update(
|
||||
appSettings.copyWith.themeSettings(
|
||||
useMaterialThemeOnItemPage: value,
|
||||
),
|
||||
|
|
@ -114,7 +114,7 @@ class AppSettingsPage extends HookConsumerWidget {
|
|||
Switch(
|
||||
value: sleepTimerSettings.autoTurnOnTimer,
|
||||
onChanged: (value) {
|
||||
ref.read(appSettingsProvider.notifier).updateState(
|
||||
ref.read(appSettingsProvider.notifier).update(
|
||||
appSettings.copyWith.playerSettings
|
||||
.sleepTimerSettings(
|
||||
autoTurnOnTimer: value,
|
||||
|
|
@ -208,7 +208,7 @@ class AppSettingsPage extends HookConsumerWidget {
|
|||
);
|
||||
ref
|
||||
.read(appSettingsProvider.notifier)
|
||||
.updateState(newSettings);
|
||||
.update(newSettings);
|
||||
Navigator.of(context).pop();
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue