flutter How to intercept the notification and do some processing before displaying it to user

Viewed 209

// I am trying to decode the encoded title and message body received from the FCM notification before fire it up by the system.

_firebaseMessaging.configure(onMessage: (Map<String, dynamic> message) async {
// when app is running on foreground       
          },
          onBackgroundMessage: myBackgroundMessageHandler,
          onLaunch: (Map<String, dynamic> message) async {
//when app is terminated or not running        
          },
          onResume: (Map<String, dynamic> message) async {
//when app is running in background
          },
        );
0 Answers
Related