onEvent method
Called whenever an event
is added
to any bloc
with the given bloc
and event
.
Implementation
@override
void onEvent(Bloc bloc, Object? event) {
super.onEvent(bloc, event);
if (onEventFunc != null) {
onEventFunc!(bloc, event);
}
events.add(
EventInfo(
bloc: bloc.runtimeType.toString(),
event: event.runtimeType.toString(),
timestamp: DateTime.now(),
),
);
}