flutterautomationuser-inactivity

How to change the current page to another when the user is inactive in Flutter?


when the app is inactive for 5 minutes in Page A, i want to redirect it to Page B. like auto redirect (without a button) Thanks you !


Solution

  • You could use Simple timer counting 5 minutes , and change the page when it’s complete. Additionally use GestureDetector on page A (or top of the app, depends on what You need), with onTap action resetting the timer. Not sure if it will be working perfectly, but it’s worth to try.