emit method

  1. @override
void emit(
  1. T state
)

Emits a new state and adds it to the history.

This method automatically manages history size to prevent memory leaks and tracks all emitted states for later verification.

Implementation

@override
void emit(T state) {
  _checkNotDisposed();
  _stateHistory.add(state);
  _trimHistoryIfNeeded();
  super.emit(state);
}