copyWith method

ProdobitConfig copyWith({
  1. String? baseUrl,
  2. String? apiVersion,
  3. Duration? timeout,
  4. Duration? connectTimeout,
  5. Duration? receiveTimeout,
  6. bool? enableLogging,
  7. int? maxRetries,
  8. Duration? retryInterval,
  9. bool? cacheEnabled,
  10. Duration? cacheDuration,
  11. Map<String, String>? headers,
})

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,
  );
}