copyWith method

RxNetConfig copyWith({
  1. String? baseUrl,
  2. NetworkAdapter? adapter,
  3. AdapterBaseOptions? adapterBaseOptions,
  4. String? cachePath,
  5. String? cacheName,
  6. String? databaseName,
  7. CacheMode? cacheMode,
  8. List<AdapterInterceptor>? interceptors,
  9. bool? systemLog,
  10. bool? isDebug,
  11. CheckNetWork? baseCheckNet,
  12. List<String>? ignoreCacheKeys,
  13. Map<String, dynamic>? baseUrlEnv,
  14. int? cacheInvalidationTime,
  15. int? cacheMaxSize,
  16. CacheEvictionPolicy? cacheEvictionPolicy,
  17. double? debugWindowWidth,
  18. 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,
  );
}