pump method

  1. @override
Future<void> pump ([Duration duration, EnginePhase phase = EnginePhase.sendSemanticsUpdate ])
override

Triggers a frame after duration amount of time.

This makes the framework act as if the application had janked (missed frames) for duration amount of time, and then received a v-sync signal to paint the application.

This is a convenience function that just calls TestWidgetsFlutterBinding.pump.

See also LiveTestWidgetsFlutterBindingFramePolicy, which affects how this method works when the test is run with flutter run.

Implementation

@override
Future<void> pump([
  Duration duration,
  EnginePhase phase = EnginePhase.sendSemanticsUpdate,
]) {
  return TestAsyncUtils.guard<void>(() => binding.pump(duration, phase));
}