pumpCell<V> method
Future<void>
pumpCell<V>({
- required ValueCell<
V> cell, - required Widget builder(
- BuildContext context,
- V? value
Pumps a bare CellBuilder over cell inside a default
MaterialApp + Scaffold frame.
No CellScope is installed; widgets under test that require one should be pumped via CellPumpWithCells.pumpWithCells instead.
Parameters:
cell: The Rendered Cell. Must be a ValueCell becauseCellBuilderrequires a synchronous current value. UseasValueCellorCellValueBuilderfor plain-Cellsources.builder: The Render Callback. Called on initial build and whenevercellemits a new value. Same contract asCellBuilder.builder— receivesV?.
Returns:
The Future from WidgetTester.pumpWidget — resolves once the first frame has been built.
See Also:
- CellPumpCell — the extension-level docs, including the rationale for omitting a CellScope.
- CellPumpWithCells.pumpWithCells — the scoped-lookup variant.
Implementation
Future<void> pumpCell<V>({
required ValueCell<V> cell,
required Widget Function(BuildContext context, V? value) builder,
}) {
return pumpWidget(MaterialApp(
home: Scaffold(
body: CellBuilder<V>(cell: cell, builder: builder),
),
));
}