FakeSyncTimer class

Manually fired timer for deterministic retry scheduling in tests.

Implemented types

Constructors

FakeSyncTimer(Duration duration, void callback())
Creates a timer that runs callback when fire is called.

Properties

duration Duration
The delay requested when the timer was scheduled.
final
hashCode int
The hash code for this object.
no setterinherited
isActive bool
Returns whether the timer is still active.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tick int
The number of durations preceding the most recent timer event.
no setteroverride

Methods

cancel() → void
Cancels the timer.
override
fire() → void
Runs the callback once if the timer is still active.
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