autoTimer method
Implementation
void autoTimer(String name, LifecycleCallback<Timer> generate) {
onStartup(() async {
final timer = await generate();
onDestroy(name, () async {
timer.cancel();
});
});
}
void autoTimer(String name, LifecycleCallback<Timer> generate) {
onStartup(() async {
final timer = await generate();
onDestroy(name, () async {
timer.cancel();
});
});
}