copyWith method

CacheResponse copyWith({
  1. CacheControl? cacheControl,
  2. List<int>? content,
  3. DateTime? date,
  4. String? eTag,
  5. DateTime? expires,
  6. List<int>? headers,
  7. String? key,
  8. String? lastModified,
  9. DateTime? maxStale,
  10. CachePriority? priority,
  11. DateTime? requestDate,
  12. DateTime? responseDate,
  13. String? url,
})

Implementation

CacheResponse copyWith({
  CacheControl? cacheControl,
  List<int>? content,
  DateTime? date,
  String? eTag,
  DateTime? expires,
  List<int>? headers,
  String? key,
  String? lastModified,
  DateTime? maxStale,
  CachePriority? priority,
  DateTime? requestDate,
  DateTime? responseDate,
  String? url,
}) {
  return CacheResponse(
    cacheControl: cacheControl ?? this.cacheControl,
    content: content ?? this.content,
    date: date ?? this.date,
    eTag: eTag ?? this.eTag,
    expires: expires ?? this.expires,
    headers: headers ?? this.headers,
    key: key ?? this.key,
    lastModified: lastModified ?? this.lastModified,
    maxStale: maxStale ?? this.maxStale,
    priority: priority ?? this.priority,
    requestDate: requestDate ?? this.requestDate,
    responseDate: responseDate ?? this.responseDate,
    url: url ?? this.url,
  );
}