SyncEntityRepository<TAppDatabase extends SynchronizerDb, TEntity, TKey> class abstract

Provides methods to get, create, update and delete entities of type

Each of these methods works by attempting to first use online data with the fallback of the offline data.

Constructors

SyncEntityRepository({required SyncTypeHandler<TEntity, TKey> syncHandler, required TAppDatabase db})
const

Properties

db → TAppDatabase
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
syncHandler SyncTypeHandler<TEntity, TKey>
final

Methods

create(TEntity entity) Future<(TEntity, DataDestination)>
createRemote(TEntity entity) Future<TEntity?>
delete(TEntity entity) Future<DataDestination>
deleteRemote(TEntity entity) Future<bool>
get(TKey id) Future<(TEntity, DataSource)>
getRemote(TKey id) Future<TEntity?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(TEntity entity) Future<(TEntity, DataDestination)>
updateRemote(TEntity entity) Future<TEntity?>
Tries to update remotely. Returns:

Operators

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