run static method
Runs the action after the specified duration.
If the same tag is provided before the timer expires, the previous
timer is cancelled and a new one starts.
Implementation
static void run(String tag, Duration duration, VoidCallback action) {
_timers[tag]?.cancel();
_timers[tag] = Timer(duration, () {
action();
_timers.remove(tag);
});
}