Use a Timer
.
Timer t = Timer(Duration(seconds: myDuration), () {
checkAnswer('');
jumpToNextQuestion();
});
// and later, before the timer goes off...
t.cancel();
Use a Timer
.
Timer t = Timer(Duration(seconds: myDuration), () {
checkAnswer('');
jumpToNextQuestion();
});
// and later, before the timer goes off...
t.cancel();