FakeAsync constructor Null safety
Creates a FakeAsync.
Within run, the clock
property will start at initialTime
and
move forward as fake time elapses.
Note: it's usually more convenient to use fakeAsync rather than creating a FakeAsync object and calling run manually.
Implementation
FakeAsync({DateTime? initialTime, this.includeTimerStackTrace = true}) {
var nonNullInitialTime = initialTime ?? clock.now();
_clock = Clock(() => nonNullInitialTime.add(elapsed));
}