LocalStorageEngine class
Storage engine that handles persistence
Constructors
- LocalStorageEngine()
-
Storage engine that handles persistence
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearTag(
String tag) → Future< void> - Clears all data associated with the specified tag.
-
dispose(
) → Future< void> - Disposes all active stream controllers.
-
getAllItems<
T extends StorableModel> (String tag, T fromJson(Map< String, dynamic> )) → Future<List< T> > -
Retrieves all stored items from a specific
tag. -
getItem<
T extends StorableModel> (String tag, String id, T fromJson(Map< String, dynamic> )) → Future<T?> -
Retrieves a stored item by its
idfrom a specifictag. -
getRawData(
String tag, {String dataTag = 'data'}) → Future - Retrieves raw data for a specified tag.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryItems<
T extends StorableModel> (String tag, T fromJson(Map< String, dynamic> ), bool filter(T item)) → Future<List< T> > -
Queries and retrieves items that match a specified
filtercondition. -
removeItem(
String tag, String id) → Future< void> - Deletes a single item from the data store associated with a specific tag.
-
removeItems(
String tag, List< String> ids) → Future<void> - Deletes multiple items from the data store associated with a specific tag.
-
removeWhere<
T extends StorableModel> (String tag, T fromJson(Map< String, dynamic> ), bool condition(T item)) → Future<void> - Deletes items from the data store associated with a specific tag if they match a given condition.
-
setItem<
T extends StorableModel> (String tag, T item) → Future< void> - Creates or updates an item in a specified collection.
-
setItems<
T extends StorableModel> (String tag, List< T> items) → Future<void> - Creates or updates multiple items in a specified collection.
-
setRawData(
String tag, dynamic data) → Future< void> - Stores raw data for a specified tag.
-
toString(
) → String -
A string representation of this object.
inherited
-
watchFilteredItems<
T extends StorableModel> (String tag, T fromJson(Map< String, dynamic> ), bool filter(T item)) → Future<Stream< List< >T> > - Watches for changes to filtered items in the data store.
-
watchItem<
T extends StorableModel> (String tag, String id, T fromJson(Map< String, dynamic> )) → Future<Stream< T?> > - Watches for changes to a specific item in the data store.
-
watchItems<
T extends StorableModel> (String tag, T fromJson(Map< String, dynamic> )) → Future<Stream< List< >T> > -
Watches for changes in the data store associated with a specific tag
and provides a stream of items of type
T. -
watchRawData(
String tag, {String dataTag = 'data'}) → Future< Stream> - Watches raw data for a specified tag.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited