After setting, I want this checking to be started HH:00, not just after 1 min from set. Do you have any idea of it?
Timer runAlarm() {
return Timer.periodic(Duration(minutes: 1), (timer) async {
workTodo();
}
After setting, I want this checking to be started HH:00, not just after 1 min from set. Do you have any idea of it?
Timer runAlarm() {
return Timer.periodic(Duration(minutes: 1), (timer) async {
workTodo();
}
The concept to get data on start point will be calling the work method before assigning the timer.
workToDo() {
print("data");
}
Timer runAlarm() {
workToDo();
return Timer.periodic(duration, (timer) {
workToDo();
});
}