JsonCacheSafeLocalStorage class final

Implementation on top of the SafeLocalStorage package.

See: Safe local storage

Implemented types

Constructors

JsonCacheSafeLocalStorage(SafeLocalStorage _localStorage)
Encapsulates a SafeLocalStorage instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Frees up storage space — deletes all keys and values.
override
contains(String key) Future<bool>
Checks for cached data at key.
override
keys() Future<UnmodifiableListView<String>>
The cache keys.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh(String key, Map<String, dynamic> value) Future<void>
It either updates the data found at key with value or, if there is no previous data at key, creates a new cache line at key with value.
override
remove(String key) Future<void>
Removes the cached data located at key.
override
toString() String
A string representation of this object.
inherited
value(String key) Future<Map<String, dynamic>?>
Retrieves the data located at key or null if a cache miss occurs.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited