FakeClock class final

A Clock whose time only changes when a test says so. Tests only.

Implemented types

Constructors

FakeClock(DateTime time)
Creates a clock frozen at time.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
time ↔ DateTime
The current fake time.
getter/setter pair

Methods

advance(Duration duration) → void
Moves the clock forward by duration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
now() → DateTime
The current instant.
override
toString() → String
A string representation of this object.
inherited

Operators

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