getBool method
Reads a value from the cache, throwing a TypeError if the value is not a bool.
Throws an ArgumentError if key
is not in this instance's filter.
Implementation
bool? getBool(String key) {
if (!_isValidKey(key)) {
throw ArgumentError(
'$key is not included in the PreferencesFilter allowlist');
}
return get(key) as bool?;
}