remove method

Future<void> remove(
  1. String key
)

Removes an entry from cache and platform.

Throws an ArgumentError if key is not in this instance's filter.

Implementation

Future<void> remove(String key) async {
  if (!_isValidKey(key)) {
    throw ArgumentError(
        '$key is not included in the PreferencesFilter allowlist');
  }
  _cache.remove(key);
  return _platformMethods.remove(key);
}