copyWith method

CachedResponse copyWith({
  1. String? id,
  2. List<int>? bytes,
  3. BaseRequest? request,
  4. DateTime? expiry,
  5. DateTime? downloadedAt,
  6. Map<String, String>? headers,
  7. bool? isRedirect,
  8. bool? persistentConnection,
  9. String? reasonPhrase,
  10. int? statusCode,
})

Implementation

CachedResponse copyWith({
  String? id,
  List<int>? bytes,
  BaseRequest? request,
  DateTime? expiry,
  DateTime? downloadedAt,
  Map<String, String>? headers,
  bool? isRedirect,
  bool? persistentConnection,
  String? reasonPhrase,
  int? statusCode,
}) =>
    CachedResponse(
      id: id ?? this.id,
      bytes: bytes ?? this.bytes,
      request: request ?? this.request,
      expiry: expiry ?? this.expiry,
      downloadedAt: downloadedAt ?? this.downloadedAt,
      headers: headers ?? this.headers,
      isRedirect: isRedirect ?? this.isRedirect,
      persistentConnection: persistentConnection ?? this.persistentConnection,
      reasonPhrase: reasonPhrase ?? this.reasonPhrase,
      statusCode: statusCode ?? this.statusCode,
    );