StoreService<T extends BasicModel> class abstract

StoreService will let you create a service which will handle most of the operations on the model out of the box, like idExist, onChange, update(), updateAll(), values

Mixed-in types

Constructors

StoreService.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
lastUpdate AppStreamElement<T>?
getter/setter pairinherited
onChange Stream<AppStreamElement<T>>
Returns a Stream of T
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List<T>
Returns list of items from the store
no setter

Methods

idExist(int id) bool
Checks if the the item exist by this id
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update({required AppStreamElement<T> element}) → void
Updates a single record in the store
override
updateAll(T update(int, T)) → void
Updates all records in the store

Operators

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