ProxyRetryPolicy.fixedDelay constructor

ProxyRetryPolicy.fixedDelay({
  1. int maxRetries = 3,
  2. Duration delay = const Duration(seconds: 1),
  3. Set<Type>? retryableExceptions,
})

Creates a new ProxyRetryPolicy with a fixed delay

Implementation

factory ProxyRetryPolicy.fixedDelay({
  int maxRetries = 3,
  Duration delay = const Duration(seconds: 1),
  Set<Type>? retryableExceptions,
}) {
  return ProxyRetryPolicy(
    maxRetries: maxRetries,
    initialBackoff: delay,
    maxBackoff: delay,
    backoffMultiplier: 1.0,
    useJitter: false,
    retryableExceptions:
        retryableExceptions ??
        const {
          ProxyConnectionError,
          ProxyTimeoutError,
          ProxyRateLimitedError,
        },
  );
}