AmplifyDataStore class

Constructors

AmplifyDataStore({required ModelProviderInterface modelProvider, dynamic errorHandler(AmplifyException)?, DataStoreConflictHandler? conflictHandler, List<DataStoreSyncExpression> syncExpressions = const [], int? syncInterval, int? syncMaxRecords, int? syncPageSize, AuthModeStrategy authModeStrategy = AuthModeStrategy.defaultStrategy})
Constructs an AmplifyDataStore plugin with mandatory modelProvider and optional datastore configuration properties including
AmplifyDataStore.emptyConstructor()
Internal use constructor

Properties

hashCode int
The hash code for this object.
no setterinherited
logger → AmplifyLogger
The logger for this class.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
runtimeTypeName String
The string value of runtimeType, saving a runtime lookup and preventing obfuscation during web compilation.
no setter
streamController StreamController<DataStoreHubEvent>
no setter

Methods

clear() Future<void>
configure({AmplifyConfig? config, required AmplifyAuthProviderRepository authProviderRepo}) Future<void>
Configures the plugin using the registered config.
configureDataStore({ModelProviderInterface? modelProvider, dynamic errorHandler(AmplifyException)?, DataStoreConflictHandler? conflictHandler, List<DataStoreSyncExpression>? syncExpressions, int? syncInterval, int? syncMaxRecords, int? syncPageSize, AuthModeStrategy authModeStrategy = AuthModeStrategy.defaultStrategy}) Future<void>
Configure AmplifyDataStore plugin with mandatory modelProvider and optional DataStore configuration properties including
delete<T extends Model>(T model, {QueryPredicate<Model>? where}) Future<void>
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>>
observeQuery<T extends Model>(ModelType<T> modelType, {QueryPredicate<Model>? where, List<QuerySortBy>? sortBy, ObserveQueryThrottleOptions throttleOptions = const ObserveQueryThrottleOptions.defaults()}) Stream<QuerySnapshot<T>>
query<T extends Model>(ModelType<T> modelType, {QueryPredicate<Model>? where, QueryPagination? pagination, List<QuerySortBy>? sortBy}) Future<List<T>>
save<T extends Model>(T model, {QueryPredicate<Model>? where}) Future<void>
start() Future<void>
stop() Future<void>
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

streamWrapper ↔ DataStoreStreamController
getter/setter pair