emitAndSettle<V> method

Future<void> emitAndSettle<V>(
  1. WidgetTester tester,
  2. Symbol id,
  3. V? value
)

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 to cell.value before pumping. Subject to the cell's own testRule / evolve rules (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:

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);
}