Storage<Key extends Object, Options> class Null safety

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

Implementers

Constructors

Storage()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent 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