Describe the bug
while clicking on notification when app is background state app is opening via messageonopenedappstream but immediately it is calling getinitalmessagemethod
To Reproduce
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
while clicking on notification via background state it should open desired page only once dont call getinitalmessage
Sample code to reproduce the problem
FirebaseMessaging.instance.getInitialMessage().then((event1) {
if (event1?.notification != null) {
if(event1?.notification!.title=='New Order'){
Describe the bug while clicking on notification when app is background state app is opening via messageonopenedappstream but immediately it is calling getinitalmessagemethod
To Reproduce
Expected behavior while clicking on notification via background state it should open desired page only once dont call getinitalmessage
Sample code to reproduce the problem FirebaseMessaging.instance.getInitialMessage().then((event1) { if (event1?.notification != null) { if(event1?.notification!.title=='New Order'){
handleMessage(event1!, context); } print("Launched from terminated state");
} });
FirebaseMessaging.onMessageOpenedApp.listen((event) { print('identi'); // NotificationServices notificationServices=NotificationServices(); // notificationServices.firebaseInit(); // notificationServices.showNotification(event); if(event.notification!=null){ if (event.notification!.title.toString()=='New Order'){