repeatAlarm method
Implementation
void repeatAlarm({required DateTime input, VoidCallback? callback}) {
final now = DateTime.now();
if (kDebugMode) {
print("INPUT:\t${input}");
}
final delay = input.difference(now);
if (kDebugMode) {
print("DELAY:\t${delay} NOW[$now]");
}
_alarmTimer?.cancel();
_alarmTimer = Timer(delay, () {
repeatAlarm(input: input.add(const Duration(days: 1)), callback: callback);
callback?.call();
});
}