add method

  1. @override
void add(
  1. Event event
)
override

Notifies the Bloc of a new event which triggers all corresponding EventHandler instances.

  • A StateError will be thrown if there is no event handler registered for the incoming event.

  • A StateError will be thrown if the bloc is closed and the event will not be processed.

Implementation

@override
void add(Event event) {
  if (_sideEffects.isClosed == false) {
    super.add(event);
  } else {
    //Managed issue Bloc trying to add event after closing
  }
}