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