addOnNotificationTap method
Notification that was tapped whilst the app is already running in the foreground or background.
This requires the notification to contain data
. The actual notification is not available.
This is an intermittently working feature. Sometimes, Android delivers an intent with no extras,
meaning we can't provide the notification from ther user.
Multiple callbacks can be registered.
Call the returned function to unsubscribe.
Implementation
VoidCallback addOnNotificationTap(NotificationTapHandler handler) {
_onNotificationTapHandlers.add(handler);
return () {
_onNotificationTapHandlers.remove(handler);
};
}