copyWith method

StormyNetworkConfig copyWith({
  1. String? baseUrl,
  2. Duration? connectTimeout,
  3. Duration? receiveTimeout,
  4. Duration? sendTimeout,
  5. Map<String, String>? headers,
  6. List<Interceptor>? interceptors,
  7. bool? enableLogging,
})

复制并修改配置

Implementation

StormyNetworkConfig copyWith({
  String? baseUrl,
  Duration? connectTimeout,
  Duration? receiveTimeout,
  Duration? sendTimeout,
  Map<String, String>? headers,
  List<Interceptor>? interceptors,
  bool? enableLogging,
}) {
  return StormyNetworkConfig(
    baseUrl: baseUrl ?? this.baseUrl,
    connectTimeout: connectTimeout ?? this.connectTimeout,
    receiveTimeout: receiveTimeout ?? this.receiveTimeout,
    sendTimeout: sendTimeout ?? this.sendTimeout,
    headers: headers ?? this.headers,
    interceptors: interceptors ?? this.interceptors,
    enableLogging: enableLogging ?? this.enableLogging,
  );
}