pumpWidget method
Implementation
Future<void> pumpWidget(Widget widget, {Shot? shot, Settle? settle}) => _step(
shot,
settle,
() async {
// Wrapped in the scenario's own bundle, so every `Image.asset`,
// `AssetImage` and `SvgPicture.asset` under the app reads through
// something that caches values rather than futures — see [assets]. An
// app that installs a `DefaultAssetBundle` of its own still wins, since
// its is the nearer ancestor.
await tester.pumpWidget(
DefaultAssetBundle(
bundle: assets,
// The slab, above the app and inside the pumped tree, so every
// capture that exists already contains it — step shots, motion
// frames, the web export — with no compositing step anywhere. The
// *insets* are on the view rather than here; see [ScenarioKeyboard].
child: _keyboard.deviceHeight > 0
? ScenarioKeyboardSlab(driver: _keyboard, child: widget)
: widget,
),
);
await _realAsyncTurn();
await tester.pump();
},
verb: 'pumpWidget',
target: '${widget.runtimeType}',
);