Timer t = Timer(Duration(seconds: myDuration), () {
askQuestion('How are you doing?');
});
// Maybe later, before the timer goes off...
t.cancel();Using Timer, my implementation works sometimes, especially with small durations. But when the duration is large, say 25, or 400 minutes, then my app would be killed and restarted, then the Timer is lost, the timeout will never happen.Thanks!--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAF5VkCWU2fq9U2ZiFaW2cYtJhmVovbTtfozznHjNUJkT_oM4cg%40mail.gmail.com.