2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Fixes for type casting

This commit is contained in:
Oliver
2021-09-28 17:53:14 +10:00
parent 9d95cae612
commit c1152ee286
18 changed files with 294 additions and 228 deletions

View File

@ -22,6 +22,17 @@ class InvenTreeSettingsManager {
return value;
}
// Load a boolean setting
Future<bool> getBool(String key, bool backup) async {
final dynamic value = await getValue(key, backup);
if (value is bool) {
return value;
} else {
return backup;
}
}
Future<void> setValue(String key, dynamic value) async {
await store.record(key).put(await _db, value);