GenericStore<T> class

Implemented types
Implementers

Constructors

GenericStore({required IStore storage, required String context, required String version, required T fromJson(dynamic)})

Properties

context String
final
data Map<String, T>
Stores map of key to pairing info
getter/setter pair
fromJson → T Function(dynamic)
final
hashCode int
The hash code for this object.
no setterinherited
onCreate → Event<StoreCreateEvent<T>>
Emitted when a new key is added to the store. The event contains the key and the value of type T.
final
onDelete → Event<StoreDeleteEvent<T>>
Emitted when a key is deleted from the store. The event contains the key and the value of type T.
final
onSync → Event<StoreSyncEvent>
Emitted when the store is persisted to storage. This event can be used as a catchall for any creations, updates, or deletions.
final
onUpdate → Event<StoreUpdateEvent<T>>
Emitted when a key is updated in some way: overwritten, some piece changes, etc. The event contains the key and the value of type T.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage IStore
final
storageKey String
no setteroverride
version String
final

Methods

checkInitialized() → void
delete(String key) Future<void>
override
get(String key) → T?
override
getAll() List<T>
override
has(String key) bool
override
init() Future<void>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
persist() Future<void>
override
restore() Future<void>
override
set(String key, T value) Future<void>
override
toString() String
A string representation of this object.
inherited

Operators

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