I want to implement a global widget which handles the app state.
What i want to do is suppose i am on home screen of the application and now i put the app in background.
Now lets suppose if i re – opens the app and app comes in foreground and the time difference between app background and foreground is more than 30 minutes the i want to refresh home screen.
This should happens if i implemented that global widget in any other screen , lets say cart screen.
Please help me with the code in flutter
2
Answers
Can you try checking AppLifecycleState.resumed in didChangeAppLifecycleState() ?