getBool static method
Return false if key is null
Implementation
static bool getBool(String? key, [bool? defValue]) {
if (key == null) {
return false;
}
assert(_initCalled,
"Prefs.init() must be called first in an initState() preferably!");
assert(_prefsInstance != null,
"Maybe call Prefs.getBoolF(key) instead. SharedPreferences not ready yet!");
return _prefsInstance?.getBool(key) ?? defValue ?? false;
}