startTimer method
- BookingHistory item
Implementation
void startTimer(BookingHistory item) {
if (item.id == null) {
return;
}
timers[item.id] = Timer.periodic(const Duration(seconds: 1), (timer) async {
counter[item.id] = max(getRemainingTime(item), 0);
if (getRemainingTime(item) < 1) {
timers[item.id]?.cancel();
counter.refresh();
await getBookingHistory();
}
});
}