final FirebaseMessaging firebaseMessaging = FirebaseMessaging();
firebaseMessaging.requestNotificationPermissions();
firebaseMessaging.configure(onLaunch: (Map<String, dynamic> msg) {
print(" onLaunch called");
return;
}, onResume: (Map<String, dynamic> msg) {
print(" onResume called");
return;
}, onMessage: (Map<String, dynamic> msg) {
print(" onMessage called");
return;
});
which is my code in inistate function of my main screen.
When the app is not on the foreground ,if I send notification through the cloud messaging, I am getting notification successfully. However when my app is on the launch, I am not not getting nay console log from my code.
what I am expecting that code, when my app is on launch , I had to get " onLaunch called" Console log message.
But I am not getting anything. I think that the configure function is not working properly.
Is there anyone who knows why this kind of problem happens?