copyWith method
复制并修改配置
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,
);
}