ErrorRecoveryConfig constructor
- RecoveryAction onError(
- LocusError error,
- ErrorContext context
- void onResolved(
- LocusError error,
- int attemptsTaken
- void onExhausted(
- LocusError error
- int maxRetries = 3,
- Duration retryDelay = const Duration(seconds: 5),
- double retryBackoff = 2.0,
- Duration maxRetryDelay = const Duration(minutes: 5),
- bool autoRestart = true,
- Set<
LocusErrorType> autoRetryTypes = const {LocusErrorType.locationTimeout, LocusErrorType.networkError, LocusErrorType.serviceDisconnected}, - Set<
LocusErrorType> ignoreTypes = const {}, - bool logErrors = true,
Creates an error recovery configuration.
Implementation
const ErrorRecoveryConfig({
this.onError,
this.onResolved,
this.onExhausted,
this.maxRetries = 3,
this.retryDelay = const Duration(seconds: 5),
this.retryBackoff = 2.0,
this.maxRetryDelay = const Duration(minutes: 5),
this.autoRestart = true,
this.autoRetryTypes = const {
LocusErrorType.locationTimeout,
LocusErrorType.networkError,
LocusErrorType.serviceDisconnected,
},
this.ignoreTypes = const {},
this.logErrors = true,
});