Reputation: 2214
Is there an API to check if the app is minimized but haven't being killed yet so it's in background?
I googled it and also also search in GitHub issues, couldn't fine one.
Does such API exist?
Upvotes: 9
Views: 8972
Reputation: 2711
You can add WidgetsBindingObserver
mixin to one or more of your widgets and listen to AppLifecycleState
.
Here is documentation and example
Upvotes: 9