RetryConfig class

Constructors

RetryConfig({int maxAttempts = 0, Duration delay = const Duration(seconds: 1), Duration maxDelay = const Duration(seconds: 30), bool retryOnTimeout = false, Set<int> retryStatusCodes = const {500, 502, 503, 504, 408, 429}, Set<Type> retryExceptions = const {SocketException, TimeoutException, HttpException}, Set<String> retryMethods = defaultRetryMethods, RetryEvaluator? retryEvaluator, bool honorRetryAfter = true, Duration? maxRetryTime})
const

Properties

delay Duration
final
hashCode int
The hash code for this object.
no setterinherited
honorRetryAfter bool
final
maxAttempts int
final
maxDelay Duration
final
maxRetryTime Duration?
final
retryEvaluator RetryEvaluator?
final
retryExceptions Set<Type>
final
retryMethods Set<String>
final
retryOnTimeout bool
final
retryStatusCodes Set<int>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldRetry bool
Returns true if retries are enabled for this configuration
no setter

Methods

copyWith({int? maxAttempts, Duration? delay, Duration? maxDelay, bool? retryOnTimeout, Set<int>? retryStatusCodes, Set<Type>? retryExceptions, Set<String>? retryMethods, RetryEvaluator? retryEvaluator, bool? honorRetryAfter, Duration? maxRetryTime}) RetryConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultRetryMethods → const Set<String>
noRetry → const RetryConfig
Creates a RetryConfig that disables all retries