onEvent method

  1. @override
void onEvent(
  1. covariant ReplayEvent event
)
override

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 first.

@override
void onEvent(Event event) {
  // Always call super.onEvent with the current event
  super.onEvent(event);

  // Custom onEvent logic goes here
}

See also:

Implementation

@override
// ignore: must_call_super
void onEvent(covariant ReplayEvent event) {
  // ignore: invalid_use_of_protected_member
  _observer.onEvent(this, event);
}