'Flutter push notification when app is closed

I want to have a push notification when the app is closed but I don't know how to do it.

I already tried firebase cloud messaging, it worked but the notification took around 3 to 5 min to come, but I need it instantly. I tried pushy.me, it works very well when the app is openned or in background but not when it's closed. And I didn't find anything in their documentation talking about closed apps. Maybe I can do something with flutter local notification and an API?



Solution 1:[1]

This article mentioned below had got 25k+ views so far. For Push notification working in background as well as in Foreground in Flutter follow this. And for redirecting it to some page follow this.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Lakshydeep Vikram Sah