addEvent method

Future<void> addEvent(
  1. BlocEvent event
)

Send an async event to the bloc

Implementation

Future<void> addEvent(BlocEvent event) async {
  if (_isDisposed) {
    return;
  }
  _state = await _executeHandler(() => _state, event, _updateState);
  _streamController.sink.add(Snapshot(_state, addEvent, addEventSync));

  return;
}