onEvent method

  1. @mustCallSuper
void onEvent(
  1. Event event
)

Called whenever an event is added to the bloc. A great spot to add logging/analytics at the individual bloc level.

Note: super.onEvent should always be called last.

@override
void onEvent(Event event) {
  // Custom onEvent logic goes here

  // Always call super.onEvent with the current event
  super.onEvent(event);
}

Implementation

@mustCallSuper
void onEvent(Event event) {
  BlocSupervisor.delegate.onEvent(this, event);
}