RetryOptions constructor

const RetryOptions({
  1. bool enabled = false,
  2. int maxRetries = 3,
  3. Duration initialDelay = const Duration(milliseconds: 500),
  4. Duration maxDelay = const Duration(seconds: 30),
  5. double backoffMultiplier = 2.0,
  6. List<int> retryableStatusCodes = const [408, 429, 500, 502, 503, 504],
  7. bool retryOnConnectionError = true,
})

Creates retry options with the specified configuration.

Implementation

const RetryOptions({
  this.enabled = false,
  this.maxRetries = 3,
  this.initialDelay = const Duration(milliseconds: 500),
  this.maxDelay = const Duration(seconds: 30),
  this.backoffMultiplier = 2.0,
  this.retryableStatusCodes = const [408, 429, 500, 502, 503, 504],
  this.retryOnConnectionError = true,
});