retry method

FutureOr<R?> retry(
  1. A a,
  2. B b,
  3. C c,
  4. D d,
  5. E e,
  6. F f,
  7. G g,
  8. H h, {
  9. R? defaultValue,
  10. bool throwOnRetryExhaustion = false,
  11. int maxRetries = 3,
  12. Duration? retryDelay,
  13. Duration? computeDelay(
    1. int retry
    )?,
  14. bool? onError(
    1. Object error,
    2. StackTrace stackTrace,
    3. int retries
    )?,
})

Alias to asyncRetry.

Implementation

FutureOr<R?> retry(
  A a,
  B b,
  C c,
  D d,
  E e,
  F f,
  G g,
  H h, {
  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(a, b, c, d, e, f, g, h),
  defaultValue: defaultValue,
  throwOnRetryExhaustion: throwOnRetryExhaustion,
  maxRetries: maxRetries,
  retryDelay: retryDelay,
  computeDelay: computeDelay,
  onError: onError,
);