handleNotificationClicked static method

void handleNotificationClicked(
  1. RemoteMessage message
)

Wire to FirebaseMessaging.onMessageOpenedApp AND FirebaseMessaging.instance.getInitialMessage() (which fires when the app launched from a tapped push). Treated as the moment the user actually engaged.

Implementation

static void handleNotificationClicked(RemoteMessage message) {
  UniTrack.instance.trackNotification(
    state: 'foreground',
    action: 'clicked',
    title: message.notification?.title,
    body:  message.notification?.body,
    notificationId: _idOf(message),
    data: _safeData(message.data),
  );
}