copyWith method

CustomDioOptions copyWith({
  1. Map<String, String>? headers,
  2. bool? followRedirects,
  3. bool? isProductionMode,
  4. String? baseUrl,
  5. String? errorPath,
  6. HttpClientAdapter? adapter,
  7. int? sendTimeout,
  8. List<Interceptor>? interceptorsList,
  9. int? receiveTimeout,
  10. int? connectTimeout,
  11. bool? logAllData,
})

Implementation

CustomDioOptions copyWith({
  Map<String, String>? headers,
  bool? followRedirects,
  bool? isProductionMode,
  String? baseUrl,
  String? errorPath,
  HttpClientAdapter? adapter,
  int? sendTimeout,
  List<Interceptor>? interceptorsList,
  int? receiveTimeout,
  int? connectTimeout,
  bool? logAllData,
}) {
  return CustomDioOptions(
    headers: headers ?? this.headers,
    followRedirects: followRedirects ?? this.followRedirects,
    isProductionMode: isProductionMode ?? this.isProductionMode,
    baseUrl: baseUrl ?? this.baseUrl,
    errorPath: errorPath ?? this.errorPath,
    adapter: adapter ?? this.adapter,
    sendTimeout: sendTimeout ?? this.sendTimeout,
    interceptorsList: interceptorsList ?? this.interceptorsList,
    receiveTimeout: receiveTimeout ?? this.receiveTimeout,
    connectTimeout: connectTimeout ?? this.connectTimeout,
    logAllData: logAllData ?? this.logAllData,
  );
}