chore: Add reset button for config viewer

This commit is contained in:
Christian Kußowski 2026-03-08 11:12:32 +01:00
commit a3a2a37a14
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 23 additions and 2 deletions

View file

@ -75,6 +75,11 @@ enum AppSettings<T> {
static SharedPreferences get store => _store!;
static SharedPreferences? _store;
static Future<void> reset({bool loadWebConfigFile = true}) async {
await AppSettings._store!.clear();
await init(loadWebConfigFile: loadWebConfigFile);
}
static Future<SharedPreferences> init({bool loadWebConfigFile = true}) async {
if (AppSettings._store != null) return AppSettings.store;