copyWith method
CacheOptions
copyWith({
- CachePolicy? policy,
- Nullable<
List< ? hitCacheOnErrorExcept,int> > - CacheKeyBuilder? keyBuilder,
- Nullable<
Duration> ? maxStale, - CachePriority? priority,
- CacheStore? store,
- Nullable<
CacheCipher> ? cipher, - bool? allowPostMethod,
Implementation
CacheOptions copyWith({
CachePolicy? policy,
Nullable<List<int>>? hitCacheOnErrorExcept,
CacheKeyBuilder? keyBuilder,
Nullable<Duration>? maxStale,
CachePriority? priority,
CacheStore? store,
Nullable<CacheCipher>? cipher,
bool? allowPostMethod,
}) {
return CacheOptions(
policy: policy ?? this.policy,
hitCacheOnErrorExcept: hitCacheOnErrorExcept != null
? hitCacheOnErrorExcept.value
: this.hitCacheOnErrorExcept,
keyBuilder: keyBuilder ?? this.keyBuilder,
maxStale: maxStale != null ? maxStale.value : this.maxStale,
priority: priority ?? this.priority,
store: store ?? this.store,
cipher: cipher != null ? cipher.value : this.cipher,
allowPostMethod: allowPostMethod ?? this.allowPostMethod,
);
}