added persisted app settings
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled
Some checks failed
Flutter APK Build / Build Flutter APK (pull_request) Has been cancelled
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user