handleNotificationReceivedForeground static method
void
handleNotificationReceivedForeground(
- RemoteMessage message
Wire to FirebaseMessaging.onMessage. Fires when a push lands while the
app is in the foreground (iOS calls willPresent → app gets a chance to
display; Android delivers to onMessage directly).
Implementation
static void handleNotificationReceivedForeground(RemoteMessage message) {
UniTrack.instance.trackNotification(
state: 'foreground',
action: 'received',
title: message.notification?.title,
body: message.notification?.body,
notificationId: _idOf(message),
data: _safeData(message.data),
);
}