read method

  1. @override
dynamic read(
  1. String key
)
override

Reads value associated with key from storage.

Implementation

@override
dynamic read(String key) {
  // Duck-typing support for shared_preferences getString.
  // ignore: avoid_dynamic_calls
  final dynamic value = _prefs.getString(_prefixedKey(key));
  if (value == null || value is! String) return null;
  return jsonDecode(value);
}