copyWith method

ClothingItem copyWith({
  1. String? name,
  2. String? category,
  3. String? style,
  4. List<String>? colors,
  5. String? imageUrl,
  6. String? imagePath,
  7. String? source,
  8. int? wearCount,
  9. DateTime? lastWornDate,
})

Implementation

ClothingItem copyWith({
  String? name,
  String? category,
  String? style,
  List<String>? colors,
  String? imageUrl,
  String? imagePath,
  String? source,
  int? wearCount,
  DateTime? lastWornDate,
}) {
  return ClothingItem(
    id: id,
    name: name ?? this.name,
    category: category ?? this.category,
    style: style ?? this.style,
    colors: colors ?? this.colors,
    imageUrl: imageUrl ?? this.imageUrl,
    imagePath: imagePath ?? this.imagePath,
    source: source ?? this.source,
    addedDate: addedDate,
    metadata: metadata,
    wearCount: wearCount ?? this.wearCount,
    lastWornDate: lastWornDate ?? this.lastWornDate,
  );
}