produceSideEffect method

void produceSideEffect(
  1. SIDE_EFFECT sideEffect
)

Emits a new sideEffect.

Implementation

void produceSideEffect(SIDE_EFFECT sideEffect) {
  try {
    if (_sideEffectController.isClosed) {
      throw StateError('Cannot emit new states after calling close');
    }
    _sideEffectController.add(sideEffect);
  } catch (error, stackTrace) {
    onError(error, stackTrace);
    rethrow;
  }
}