FakeSyncTimerFactory class

Collects engine retry timers so tests can fire them manually.

Pass call as the engine's timerFactory:

final timers = FakeSyncTimerFactory();
final engine = SyncEngine(
  store: InMemorySyncStore(),
  transport: FakeSyncTransport(),
  timerFactory: timers.call,
);

Constructors

FakeSyncTimerFactory()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timers List<FakeSyncTimer>
Timers created by the engine, in creation order.
final

Methods

call(Duration duration, void callback()) Timer
Creates and records a FakeSyncTimer; matches SyncTimerFactory.
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