delayed method Null safety
- Duration duration
override
Delay for duration
of time.
In the automated test environment (AutomatedTestWidgetsFlutterBinding,
typically used in flutter test
), this advances the fake clock for the
period.
In the live test environment (LiveTestWidgetsFlutterBinding, typically
used for flutter run
and for e2e), it is
equivalent to Future.delayed.
Implementation
@override
Future<void> delayed(Duration duration) {
assert(_currentFakeAsync != null);
_currentFakeAsync!.elapse(duration);
return Future<void>.value();
}