NoRetryPolicy class
Policy that never retries. Use to disable retry on a specific request.
- Inheritance
-
- Object
- RetryPolicy
- NoRetryPolicy
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.attemptis 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
trueif another attempt should be made after attemptattemptfailed with the givenstatusCodeorerror.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited