emit<T> method

void emit<T>(
  1. Emitter<T> emitter,
  2. T state
)

Set state of the emitter. Use this only if you control all the paths the emitter could be recreated, to avoid the value emitted here override by other state propagation flows.

Implementation

void emit<T>(Emitter<T> emitter, T state) {
  final element = _element(emitter, recreate: false) as EmitterElement<T>;
  element.emit(state);
}