maxAttemptWaitTime property Null safety
Max wait time between attempts.
Exponential backoff is used for calculating the wait time and cannot be customized.
Setting this value to Duration.zero or a negative Duration will result in an ArgumentError being thrown.
To use the default of 300 seconds, set this property to null
.
Implementation
Duration? get maxAttemptWaitTime => _maxAttemptWaitTime;
Implementation
set maxAttemptWaitTime(Duration? maxAttemptWaitTime) {
if (maxAttemptWaitTime != null && maxAttemptWaitTime.inSeconds <= 0) {
throw ArgumentError.value(
maxAttemptWaitTime,
'maxAttemptWaitTime',
'must not be zero or negative',
);
}
_maxAttemptWaitTime = maxAttemptWaitTime;
}