FakeClock class
A clock a test moves by hand: advance passes time and fires the timers that fall due, in due order, each seeing the clock at its own due time.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- pendingTimers → int
-
How many timers are armed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
advance(
Duration by) → void -
Moves the clock forward by
by, firing due timers as it goes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
now(
) → Duration -
The current instant.
override
-
timer(
Duration duration, void callback()) → Timer -
A timer that fires
callbackoncedurationhas passed on this clock.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited