add method

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

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(E event) {
  if (!isClosed) {
    super.add(event);
  }
}