flush method
void
flush()
Performs all the eligible pending actions.
Implementation
void flush() {
final current = now;
while (scheduled.isNotEmpty && !scheduled.firstKey()!.isAfter(current)) {
final actions = scheduled.remove(scheduled.firstKey());
for (final action in actions ?? const <SchedulerAction>[]) {
action.run();
}
}
}