Storage<E> class Null safety

Single item store.

Abstraction over a single item storage. Useful for testing, easy switching of implementations and combining/abstracting multiple implementations - for example: memory-cache + file implementation.

Implementers

Constructors

Storage()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

delete() Future<void>
Deletes any written item. If no item is found completes without error.
get() Future<E?>
Retrieves the saved item or returns null if no item is found.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
save(E item) Future<E>
Saves the given item, overriding any previous entries.
toString() String
A string representation of this object.
inherited

Operators

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