SyncEngine class

Replays queued offline requests through a NebulaClient.

Constructors

SyncEngine({required NebulaClient client, required RequestQueue queue, void onProgress(int completed, int total)?, void onComplete(SyncResult result)?, void onItemError(QueuedRequest item, Object error)?})

Properties

client NebulaClient
final
hashCode int
The hash code for this object.
no setterinherited
isSyncing bool
no setter
onComplete → void Function(SyncResult result)?
Called when all items are processed.
final
onItemError → void Function(QueuedRequest item, Object error)?
Called when an item fails and is requeued / dropped.
final
onProgress → void Function(int completed, int total)?
Called with (completed, total) after each successful replay.
final
queue RequestQueue
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sync() Future<SyncResult>
Drains the queue, replaying each request through the client.
toString() String
A string representation of this object.
inherited

Operators

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