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
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onChange
→ Stream<
StreamElement< T> > -
Returns a Stream of StreamElement of
Tno 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
itemto the store. -
delete(
T item) → void -
Deletes an
itemfrom the store. -
deleteItemById(
String id) → void -
Deletes an
itemfrom the store by the given id. -
getById(
String id) → T? -
Finds and returns the item by
idIf 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
itemin the store.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited