RetryPolicy constructor
const
RetryPolicy({
- int maxRetries = 3,
- BackoffStrategy backoff = const ExponentialBackoff(),
- bool shouldRetry()?,
Creates a RetryPolicy.
maxRetries— maximum number of retry attempts (default 3).backoff— strategy that computes the delay between retries.shouldRetry— optional predicate; if provided, only errors for which this returnstrueare retried. By default everything is retryable.
Implementation
const RetryPolicy({
this.maxRetries = 3,
this.backoff = const ExponentialBackoff(),
this.shouldRetry,
});