emitAndSettle<V> method
Sets cell's value to value, then pumps until the widget tree
settles.
The common assertion pattern: emit, let the graph and widgets catch
up, then assert. See the extension-level Async receptor caveats for
the one case (Future.delayed / Timer) where pumpAndSettle alone
is insufficient.
Parameters:
cell: The Emitted Cell. Must be a ValueCell — the method assignscell.valuesynchronously. For plainCellsources, emit through their input cells instead.value: The New Value. Assigned tocell.valuebefore pumping begins. Subject to the cell's owntestRuleandevolvelogic — an update rejected by the cell's integrity gate does not change the value and the tree settles on the previous state.
Returns:
A Future that completes when the frame pipeline is idle — the same completion semantics as WidgetTester.pumpAndSettle.
See Also:
- emitAndPump — the single-frame variant for observing intermediate state or advancing a timer.
- CellEmitAndSettle — the extension-level docs, including the async receptor caveats.
Implementation
Future<void> emitAndSettle<V>(ValueCell<V> cell, V? value) async {
cell.value = value;
await pumpAndSettle();
}