setBool method
Saves a boolean value
to the cache and platform.
Throws an ArgumentError if key
is not in this instance's filter.
Implementation
Future<void> setBool(String key, bool value) async {
if (!_isValidKey(key)) {
throw ArgumentError(
'$key is not included in the PreferencesFilter allowlist');
}
_cache[key] = value;
return _platformMethods.setBool(key, value);
}