StoreService<T extends BaseModel> 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

Constructors

StoreService()

Properties

hashCode int
The hash code for this object.
no setterinherited
onChange Stream<StreamElement<T>>
Returns a Stream of StreamElement of T
no setter
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

add(T item) → void
Updates all records in the store Adds an item to the store.
delete(T item) → void
Deletes an item from the store.
deleteItemById(String id) → void
Deletes an item from the store by the given id.
getById(String id) → T?
Finds and returns the item by id If the item is not found, null will be returned
idExist(String 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(T item) → void
Updates an item in the store.

Operators

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