copyWith method
Create a copy with modified values
Implementation
ProdobitConfig copyWith({
String? baseUrl,
String? apiVersion,
Duration? timeout,
Duration? connectTimeout,
Duration? receiveTimeout,
bool? enableLogging,
int? maxRetries,
Duration? retryInterval,
bool? cacheEnabled,
Duration? cacheDuration,
Map<String, String>? headers,
}) {
return ProdobitConfig(
baseUrl: baseUrl ?? this.baseUrl,
apiVersion: apiVersion ?? this.apiVersion,
timeout: timeout ?? this.timeout,
connectTimeout: connectTimeout ?? this.connectTimeout,
receiveTimeout: receiveTimeout ?? this.receiveTimeout,
enableLogging: enableLogging ?? this.enableLogging,
maxRetries: maxRetries ?? this.maxRetries,
retryInterval: retryInterval ?? this.retryInterval,
cacheEnabled: cacheEnabled ?? this.cacheEnabled,
cacheDuration: cacheDuration ?? this.cacheDuration,
headers: headers ?? this.headers,
);
}