postUiEvent method

  1. @override
void postUiEvent(
  1. BaseBlocEvent event
)
override

this will automatically send the event received from the UI to your analytics implementation if you passed the type list to your Template bloc when extending it

Implementation

@override
void postUiEvent(BaseBlocEvent event) {
  if (event.analyticEventName?.isNotEmpty == true) {
    analytics.logEvent(event.analyticEventName!.toLowerCase(), [...?analyticFrameworkTypes],
        properties: event.eventProperties ?? {});
  }
}