add method Null safety

void add(
  1. Event event

Notifies the Bloc of a new event which triggers mapEventToState. If close has already been called, any subsequent calls to add will be ignored and will not result in any subsequent state changes.


void add(Event event) {
  if (_eventController.isClosed) return;
  try {
  } catch (error, stackTrace) {
    onError(error, stackTrace);