Storage<Key extends Object, Options> class abstract

A persistent store for simple data. Data is persisted to disk asynchronously.

Implementers

Constructors

Storage()

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([Options? options]) Future<void>
Completes with true once the storage for the app has been cleared.
containsKey(Key key, [Options? options]) Future<bool>
Returns a future complete with value true if the persistent storage contains the given key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T extends Object>(Key key, Decoder<T?> decoder, [Options? options]) Future<T?>
Reads a value of any type from persistent storage.
readAll([Options? options]) Future<Map<Key, Object?>>
Returns all keys in the persistent storage.
remove(Key key, [Options? options]) Future<void>
Removes an entry from persistent storage.
toString() String
A string representation of this object.
inherited
write<T extends Object>(Key key, T? value, Encoder<T?> encoder, [Options? options]) Future<void>
Saves a value to persistent storage.

Operators

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