copyWith method
Creates a copy with updated values.
Implementation
RetryConfig copyWith({
int? maxAttempts,
Duration? initialDelay,
Duration? maxDelay,
Duration? timeoutDuration,
bool Function(Exception error)? shouldRetry,
}) {
return RetryConfig(
maxAttempts: maxAttempts ?? this.maxAttempts,
initialDelay: initialDelay ?? this.initialDelay,
maxDelay: maxDelay ?? this.maxDelay,
timeoutDuration: timeoutDuration ?? this.timeoutDuration,
shouldRetry: shouldRetry ?? this.shouldRetry,
);
}