How to create a time-based Flutter App?

Posted by Jennifer | Updated on

Want to create a time-based Flutter App? You can use the Timer class to trigger a log out function after 3 minutes of inactivity. Something you can try is to wrap your entire app in a GestureDetector that resets the timer on any event. You’d just have to make sure that any other GestureDetectors in your app use HitTestBehavior.translucent so the events are propagated to your root listener.

Here is a full example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers