get method

Object? get(
  1. String key
)

Reads a value of any type from the cache.

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

Implementation

Object? get(String key) {
  if (!_isValidKey(key)) {
    throw ArgumentError(
        '$key is not included in the PreferencesFilter allowlist');
  }
  return _cache[key];
}