feat: implement per book settings with player configuration and update methods

This commit is contained in:
Dr-Blank 2024-09-17 23:19:05 -04:00
parent fd42ee2343
commit e7dd4de515
No known key found for this signature in database
GPG key ID: 7452CC63F210A266
19 changed files with 1030 additions and 20 deletions

View file

@ -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(