copyWith method

CacheTarget copyWith({
  1. String? type,
  2. String? path,
  3. int? size,
  4. bool? safeToDelete,
  5. bool? isGlobal,
  6. bool? exists,
})

Creates a copy of this CacheTarget with updated fields.

Implementation

CacheTarget copyWith({
  String? type,
  String? path,
  int? size,
  bool? safeToDelete,
  bool? isGlobal,
  bool? exists,
}) {
  return CacheTarget(
    type: type ?? this.type,
    path: path ?? this.path,
    size: size ?? this.size,
    safeToDelete: safeToDelete ?? this.safeToDelete,
    isGlobal: isGlobal ?? this.isGlobal,
    exists: exists ?? this.exists,
  );
}