RetryConfig constructor

const RetryConfig({
  1. int maxAttempts = 5,
  2. Duration initialDelay = const Duration(seconds: 1),
  3. Duration maxDelay = const Duration(seconds: 60),
  4. double backoffMultiplier = 2,
  5. double jitter = 1.0,
  6. List<Object>? exceptions,
})

Creates retry configuration.

Implementation

const RetryConfig({
  this.maxAttempts = 5,
  this.initialDelay = const Duration(seconds: 1),
  this.maxDelay = const Duration(seconds: 60),
  this.backoffMultiplier = 2,
  this.jitter = 1.0,
  this.exceptions,
}) : assert(jitter >= 0, 'jitter must be non-negative.');