flushTimers abstract method
Runs all timers until no timers remain (subject to flushPeriodicTimers
option), including those scheduled as a result of running them.
timeout
lets you set the maximum amount of time the flushing will take.
Throws a StateError if the timeout
is exceeded. The default timeout
is 1 hour. timeout
is relative to the elapsed time.
Implementation
void flushTimers(
{Duration timeout = const Duration(hours: 1),
bool flushPeriodicTimers = true});