RetryInterceptor constructor

RetryInterceptor({
  1. required Dio dio,
  2. dynamic logPrint(
    1. String message
    )?,
  3. int retries = 3,
  4. List<Duration> retryDelays = const [Duration(seconds: 1), Duration(seconds: 3), Duration(seconds: 5)],
  5. RetryEvaluator? retryEvaluator,
  6. bool ignoreRetryEvaluatorExceptions = false,
})

Implementation

RetryInterceptor({
  required this.dio,
  this.logPrint,
  this.retries = 3,
  this.retryDelays = const [
    Duration(seconds: 1),
    Duration(seconds: 3),
    Duration(seconds: 5),
  ],
  RetryEvaluator? retryEvaluator,
  this.ignoreRetryEvaluatorExceptions = false,
}) : _retryEvaluator = retryEvaluator ?? defaultRetryEvaluator;