DataStoreCategory class

Interface for DataStore category. This expose all the APIs that are supported by this category's plugins. This class will accept plugins to be registered and configured and then subsequent API calls will be forwarded to those plugins.

Inheritance

Constructors

DataStoreCategory()

Properties

category Category
no setteroverride
categoryDependencies Set<Category>
The categories this category depends on.
no setteroverride
defaultPlugin → DataStorePluginInterface
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
plugins List<DataStorePluginInterface>
The plugins registered for this category.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
streamController StreamController<DataStoreHubEvent>
Get streamController
no setter

Methods

addPlugin(DataStorePluginInterface plugin, {required AmplifyAuthProviderRepository authProviderRepo}) Future<void>
Adds a plugin to the category.
override
clear() Future<void>
Stops the underlying DataStore's synchronization with a remote system, if DataStore is configured to support remote synchronization, resetting the plugin to the initialized state, and deletes all data from the local device.
delete<T extends Model>(T model, {QueryPredicate<Model>? where}) Future<void>
Delete model from the DataStore.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe<T extends Model>(ModelType<T> modelType, {QueryPredicate<Model>? where}) Stream<SubscriptionEvent<T>>
Observe changes on the specified modelType.
observeQuery<T extends Model>(ModelType<T> modelType, {QueryPredicate<Model>? where, List<QuerySortBy>? sortBy, ObserveQueryThrottleOptions throttleOptions = const ObserveQueryThrottleOptions.defaults()}) Stream<QuerySnapshot<T>>
Observe the result set of a given Query.
query<T extends Model>(ModelType<T> modelType, {QueryPredicate<Model>? where, QueryPagination? pagination, List<QuerySortBy>? sortBy}) Future<List<T>>
Query the DataStore to find all items of the specified modelType that satisfy the specified query predicate where.
reset() Future<void>
Resets the category, clearing all registered plugins.
inherited
save<T extends Model>(T model, {QueryPredicate<Model>? where}) Future<void>
Save model into the DataStore.
start() Future<void>
Starts the DataStore's synchronization with a remote system, if DataStore is configured to support remote synchronization.
stop() Future<void>
Stops the underlying DataStore's synchronization with a remote system, if DataStore is configured to support remote synchronization.
toString() String
A string representation of this object.
inherited

Operators

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