copyWith method

HttpOptions copyWith({
  1. Duration? timeout,
  2. bool? useCache,
  3. Optional<String?>? cacheStoragePath,
  4. Optional<int?>? cacheMaxSize,
})

Implementation

HttpOptions copyWith({
  Duration? timeout,
  bool? useCache,
  Optional<String?>? cacheStoragePath,
  Optional<int?>? cacheMaxSize
}) {
  return HttpOptions(
    timeout: timeout ?? this.timeout,
    useCache: useCache ?? this.useCache,
    cacheStoragePath: cacheStoragePath != null ? cacheStoragePath.value : this.cacheStoragePath,
    cacheMaxSize: cacheMaxSize != null ? cacheMaxSize.value : this.cacheMaxSize
  );
}