AsyncStorage class

A storage for AsyncField instances.

Available Extensions

Constructors

AsyncStorage([String name = ''])

Properties

canFetch bool
Returns true if a fetch can be performed.
no setter
fields List<AsyncField>
no setter
fieldsIDs List<AsyncFieldID>
no setter
fieldsTimeout Duration?
Timeout to use in all fields instantiated by this storage.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
final
isClosed bool
Returns true if this instance is closed.
no setter
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all fields calling AsyncField.disposeValue.
close() → void
Closes this instance.
delete<T>(AsyncField<T> asyncField) FutureOr<bool>
Deletes an asyncField value.
dispose(AsyncField asyncField) FutureOr<bool>
Disposes an asyncField.
fetch<T>(AsyncField<T> asyncField) FutureOr<T>
Fetches an asyncField value.
getField<T>(dynamic id) AsyncField<T>
Returns a AsyncField for the id.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reopen({bool clear = true}) bool
Reopens this storage if isClosed.
save<T>(AsyncField<T> asyncField, T value) FutureOr<T>
Saves an asyncField value.
setField<T>(dynamic id, T value) FutureOr<T>
Sets the AsyncField for the id with value.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic id) AsyncField