retry method

FutureOr<R?> retry({
  1. R? defaultValue,
  2. bool throwOnRetryExhaustion = false,
  3. int maxRetries = 3,
  4. Duration? retryDelay,
  5. Duration? computeDelay(
    1. int retry
    )?,
  6. bool? onError(
    1. Object error,
    2. StackTrace stackTrace,
    3. int retries
    )?,
})

Alias to asyncRetry.

Implementation

FutureOr<R?> retry({
  R? defaultValue,
  bool throwOnRetryExhaustion = false,
  int maxRetries = 3,
  Duration? retryDelay,
  Duration? Function(int retry)? computeDelay,
  bool? Function(Object error, StackTrace stackTrace, int retries)? onError,
}) => asyncRetry<R>(
  this,
  defaultValue: defaultValue,
  throwOnRetryExhaustion: throwOnRetryExhaustion,
  maxRetries: maxRetries,
  retryDelay: retryDelay,
  computeDelay: computeDelay,
  onError: onError,
);