added persisted app settings
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled

This commit is contained in:
2026-01-23 18:03:46 +01:00
parent cad43c7664
commit 83bfdf322b
5 changed files with 143 additions and 32 deletions

View File

@@ -12,9 +12,13 @@ class SettingsProvider extends ChangeNotifier {
void setExportDirectoryPath(String path, {bool silent = false}) {
_settings = _settings.copyWith(exportDirectoryPath: path);
_saveSettings();
Storage.saveSettings(_settings);
if (!silent) notifyListeners();
}
void _saveSettings() => Storage.saveSettings(_settings);
void setAlwaysExportEnabled(bool enabled, {bool silent = false}) {
_settings = _settings.copyWith(alwaysExportEnabled: enabled);
Storage.saveSettings(_settings);
if (!silent) notifyListeners();
}
}