addEventSync<Tb extends BlocEvent> method

T addEventSync<Tb extends BlocEvent>(
  1. Tb event
)

Send a synchronous event to the bloc

Implementation

T addEventSync<Tb extends BlocEvent>(Tb event) {
  if (_isDisposed) {
    return _state;
  }

  if (event is! RebuildEvent) {
    _state = _executeHandlerSync(_state, event);
  }
  _streamController.sink.add(Snapshot(_state, addEvent, addEventSync));

  return _state;
}