getEmissionCount method

int getEmissionCount(
  1. T targetState
)

Gets the number of times a specific state was emitted.

Implementation

int getEmissionCount(T targetState) {
  _checkNotDisposed();
  return _stateHistory.where((state) => state == targetState).length;
}