BackgroundSyncHandler class abstract

--- SyncHandler --- Contract for a feature-specific sync implementation. Handles fetching local/remote data and applying changes.

Constructors

BackgroundSyncHandler()

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

applyToLocal(List<SyncPayload<Syncable>> remoteStates) Future<ApplyResult>
Apply a batch of remote items to local storage Returns success/failure with detailed errors
applyToRemote(List<SyncPayload<Syncable>> localStates) Future<ApplyResult>
Apply a batch of local items to remote storage Returns success/failure with detailed errors
getLocal() Future<List<SyncPayload<Syncable>>>
Fetch local items for sync Default: return all items as a list of SyncPayload
getRemote({String? cursor, required int batchSize}) Future<SyncBatchResult>
Fetch remote items for sync with optional pagination batchSize controls how many items to fetch per page (required). Returns a batch and a nextCursor if more pages are available
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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