Even if you remove the app from the background in flutter, a toast message should come every 1 second. Does anyone have a solution for this?
Asked
Active
Viewed 774 times
0
-
Does this answer your question? [Android display Toast even the app is closed](https://stackoverflow.com/questions/12333600/android-display-toast-even-the-app-is-closed) – Lalit Fauzdar Mar 16 '22 at 08:19
-
this is for android not for flutter – Kathiriya Vishal Mar 16 '22 at 08:36
-
It doesn't matter as the output remains same, any app showing Toast when it's in background is bad UX and Notifications should be preferred instead. Also, no you can't show toast when app is closed as `context` is required. – Lalit Fauzdar Mar 16 '22 at 10:05
1 Answers
0
you need to run a background service run timer every second if the user removes the app from the background and displays toast every second check this https://docs.flutter.dev/development/packages-and-plugins/background-processes

Noha El Sheweikh
- 146
- 1
- 5