scheduleRetry method
- LocusErrorType errorType,
- void retryAction()
Schedules a retry with appropriate delay.
Implementation
void scheduleRetry(
LocusErrorType errorType,
void Function() retryAction,
) {
final delay = getRetryDelay(errorType);
_retryTimers[errorType]?.cancel();
_retryTimers[errorType] = Timer(delay, () {
_retryTimers.remove(errorType);
retryAction();
});
}