pumpWidget method

void pumpWidget(
  1. Widget widget
)

Mounts widget as the root of the test tree (wrapped in the canonical TuiBindingScope + FocusManagerScope + Overlay chrome). On subsequent calls, swaps the user widget in place while preserving the binding / focus manager / overlay state — this matches WidgetTester.pumpWidget semantics, where state keyed by the wrappers (e.g. focused node identity) survives across re-pumps. Completes the first frame, including layout and post-frame callbacks.

Implementation

void pumpWidget(Widget widget) {
  _assertNotDisposed('pumpWidget');
  mountWidget(widget);
  pump();
}