'how to call FirebaseMessaging.instance.getInitialMessage() in terminated state when we are sending only data in notification

how to call FirebaseMessaging.instance.getInitialMessage() in terminated state when we are sending only data in notification

{ "registration_ids": [ "f5NVS77NRj---hGmZ"

],

"data": {
    "title": "Terdhhhdsminated, hello Message....",
    "body": "Good MORNING this is flutter notification test message from gcsdcy",
    "android_channel_id": "fdsfsfs",
    "rdsdh": "12348",
    "fdg": "hcgdsgds"
}

}

when i am clicking notification , app is redirecting to main page instead of specified detail page



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source