NoRetryPolicy class

Policy that never retries. Use to disable retry on a specific request.

Inheritance

Constructors

NoRetryPolicy()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
maxAttempts int
Total number of attempts. 1 = try once, no retry.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delayFor(int attempt) Duration
Returns the delay to wait before attempt number attempt. attempt is 1-based: value for the next attempt.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRetry(int attempt, int? statusCode, Object? error) bool
Returns true if another attempt should be made after attempt attempt failed with the given statusCode or error.
override
toString() String
A string representation of this object.
inherited

Operators

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