emitAndSettle<V> method
Sets the value of the cell at id and pumps the tree to settle.
Delegates to CellEmitAndSettle.emitAndSettle, resolving the cell through valueCell first so the value type is checked at the call site.
Parameters:
tester: The Active Tester. Supplied per call.id: The Registration Key of the cell to emit on.value: The New Value. Assigned tocell.valuebefore pumping. Subject to the cell's owntestRule/evolverules (see CellEmitAndSettle.emitAndSettle).
Returns:
A Future that resolves when the frame pipeline is idle.
Throws:
StateError if dispose has already been called, or — via
valueCell — if id is unknown or the value type does not match.
See Also:
- CellEmitAndSettle.emitAndSettle — the underlying helper, including the async-receptor caveats.
- valueCell — the lookup used to resolve
id.
Implementation
Future<void> emitAndSettle<V>(
WidgetTester tester,
Symbol id,
V? value,
) async {
if (_disposed) {
throw StateError('CellTestHarness: emitAndSettle called after dispose.');
}
await tester.emitAndSettle(valueCell<V>(id), value);
}