add method

void add(
  1. E event
)
inherited

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

Implementation

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