chore: Add reset button for config viewer
This commit is contained in:
parent
bad0a549cb
commit
a3a2a37a14
3 changed files with 23 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue