copyWith method
RxNetConfig
copyWith({
- String? baseUrl,
- NetworkAdapter? adapter,
- AdapterBaseOptions? adapterBaseOptions,
- String? cachePath,
- String? cacheName,
- String? databaseName,
- CacheMode? cacheMode,
- List<
AdapterInterceptor> ? interceptors, - bool? systemLog,
- bool? isDebug,
- CheckNetWork? baseCheckNet,
- List<
String> ? ignoreCacheKeys, - Map<
String, dynamic> ? baseUrlEnv, - int? cacheInvalidationTime,
- int? cacheMaxSize,
- CacheEvictionPolicy? cacheEvictionPolicy,
- double? debugWindowWidth,
- double? debugWindowHeight,
复制并修改配置
Implementation
RxNetConfig copyWith({
String? baseUrl,
NetworkAdapter? adapter,
AdapterBaseOptions? adapterBaseOptions,
String? cachePath,
String? cacheName,
String? databaseName,
CacheMode? cacheMode,
List<AdapterInterceptor>? interceptors,
bool? systemLog,
bool? isDebug,
CheckNetWork? baseCheckNet,
List<String>? ignoreCacheKeys,
Map<String, dynamic>? baseUrlEnv,
int? cacheInvalidationTime,
int? cacheMaxSize,
CacheEvictionPolicy? cacheEvictionPolicy,
double? debugWindowWidth,
double? debugWindowHeight,
}) {
return RxNetConfig(
baseUrl: baseUrl ?? this.baseUrl,
adapter: adapter ?? this.adapter,
adapterBaseOptions: adapterBaseOptions ?? this.adapterBaseOptions,
cachePath: cachePath ?? this.cachePath,
cacheName: cacheName ?? this.cacheName,
databaseName: databaseName ?? this.databaseName,
cacheMode: cacheMode ?? this.cacheMode,
interceptors: interceptors ?? this.interceptors,
systemLog: systemLog ?? this.systemLog,
isDebug: isDebug ?? this.isDebug,
baseCheckNet: baseCheckNet ?? this.baseCheckNet,
ignoreCacheKeys: ignoreCacheKeys ?? this.ignoreCacheKeys,
baseUrlEnv: baseUrlEnv ?? this.baseUrlEnv,
cacheInvalidationTime: cacheInvalidationTime ?? this.cacheInvalidationTime,
cacheMaxSize: cacheMaxSize ?? this.cacheMaxSize,
cacheEvictionPolicy: cacheEvictionPolicy ?? this.cacheEvictionPolicy,
debugWindowWidth: debugWindowWidth ?? this.debugWindowWidth,
debugWindowHeight: debugWindowHeight ?? this.debugWindowHeight,
);
}