RetryConfig constructor

const RetryConfig({
  1. int maxAttempts = 3,
  2. Duration initialDelay = const Duration(seconds: 1),
  3. Duration maxDelay = const Duration(seconds: 10),
  4. Duration timeoutDuration = const Duration(seconds: 30),
  5. bool shouldRetry(
    1. Exception error
    )?,
})

Implementation

const RetryConfig({
  this.maxAttempts = 3,
  this.initialDelay = const Duration(seconds: 1),
  this.maxDelay = const Duration(seconds: 10),
  this.timeoutDuration = const Duration(seconds: 30),
  this.shouldRetry,
}) : assert(maxAttempts > 0, 'maxAttempts must be greater than 0');