copyWith method
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,
);
}