mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Fixes for type casting
This commit is contained in:
parent
9d95cae612
commit
c1152ee286
18 changed files with 294 additions and 228 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue