Added configuration redirect and partial settings form

This commit is contained in:
rzuasti
2026-03-02 19:41:01 -05:00
parent e6b5594226
commit 1d029c8c5f
3 changed files with 119 additions and 4 deletions
+3 -3
View File
@@ -28,11 +28,11 @@ class PrefUtil {
static Object getValue(String key, Object defaultValue) {
switch (defaultValue.runtimeType) {
case String:
return preferences.getString(key) ?? "";
return preferences.getString(key) ?? defaultValue;
case bool:
return preferences.getBool(key) ?? false;
return preferences.getBool(key) ?? defaultValue;
case int:
return preferences.getInt(key) ?? 0;
return preferences.getInt(key) ?? defaultValue;
default:
return defaultValue;
}