StoreEventsMixin<V extends Entity> mixin
Methods
-
afterCreate(V saved)
→ FutureOr
-
Runs only after creation
override
-
afterDelete(MKey? id)
→ FutureOr
-
override
-
afterSave(V saved)
→ FutureOr
-
Runs after update or creation
override
-
afterUpdate(V saved)
→ FutureOr
-
Runs only on update
override
-
applyChanges<R>(FutureOr<R> build(MapDiffs<MKey, Record<V>> changes), {Map<MKey, Record<V>>? replacement})
→ FutureOr<R>
-
inherited
-
beforeDelete(V toDelete)
→ FutureOr
-
override
-
beforeSave(V toSave)
→ FutureOr
-
override
-
checked<R>(R fn())
→ FutureOr<R>
-
Executes a function if the full data set is loaded, otherwise,
returns a future
inherited
-
clear()
→ Future
-
inherited
-
containsKey(MKey key)
→ bool
-
inherited
-
create(V input)
→ Future<V>
-
inherited
-
createWith(FutureOr modification(V input))
→ Future<V>
-
inherited
-
delete(V input)
→ Future<bool>
-
inherited
-
dispose()
→ Future
-
inherited
-
doShutdown()
→ Future
-
inherited
-
exec<R>(R block())
→ R?
-
inherited
-
exists(MKey key)
→ FutureOr<bool>
-
Whether the record exists = makes sure the data set is loaded first.
inherited
-
fetchAll({double? offset, double? limit})
→ Future<List<Record<V>>>
-
inherited
-
get(MKey? key, [V? value])
→ Record<V>
-
Returns the value associated with a key in a map -- this entity is
designed to track any changes to the key from which it originated.
inherited
-
getOrPut(MKey id, [V? value])
→ Record<V>
-
inherited
-
isShuttingDown()
→ bool
-
inherited
-
list({bool? forceRefresh, double? offset, double? limit})
→ FutureOr<List<Record<V>>>
-
Lists the available data for this store. If subsequent calls are made, they will resolve to the same future.
inherited
-
load(MKey key)
→ FutureOr<V?>
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onLogin(AsyncOrCallback onLogin)
→ void
-
inherited
-
onLogout(AsyncOrCallback onLogout)
→ void
-
inherited
-
onReload({bool includeCurrentState = true})
→ Stream<List<Record<V>>>
-
inherited
-
onShutdown(_AsyncCallback callback)
→ void
-
inherited
-
onStartup(_AsyncCallback callback)
→ void
-
inherited
-
put(MKey id, void modification(V _in), {bool ignoreNotLoaded = false})
→ FutureOr<V?>
-
Updates the internal map without triggering any persistence. It's possible that other entities that are
observing this store will update.
inherited
-
putRecord(MKey id, V data)
→ void
-
inherited
-
registerAfterCreate(Event<V> handler)
→ dynamic
-
-
registerAfterDelete(AfterDelete afterDelete)
→ dynamic
-
-
registerAfterSave(Event<V> handler)
→ dynamic
-
-
registerBeforeDelete(BeforeDelete<V> handler)
→ dynamic
-
-
registerDisposer(FutureOr dispose())
→ void
-
inherited
-
registerLoginHooks(IAuthState state)
→ void
-
inherited
-
reload(MKey id)
→ Future<V?>
-
inherited
-
removeDisposer(FutureOr dispose())
→ void
-
inherited
-
removeRecord(MKey id)
→ void
-
inherited
-
resetCompleteFlag()
→ void
-
inherited
-
save(V input)
→ Future<V>
-
inherited
-
saveAll(Iterable<MKey> keys, FutureOr modification(MKey key, V input))
→ Future
-
inherited
-
saveWith(MKey? key, FutureOr modification(V input))
→ Future<V>
-
inherited
-
takeFrom(V _source, V _target)
→ void
-
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateAllItems(Iterable<V> data)
→ Future
-
inherited