copyWith method
Implementation
Item copyWith({
String? id,
String? description,
int? priceCents,
int? quantity,
String? createdAt,
String? updatedAt,
String? price,
bool? destroy,
}) {
return Item(
id: id ?? this.id,
description: description ?? this.description,
priceCents: priceCents ?? this.priceCents,
quantity: quantity ?? this.quantity,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
price: price ?? this.price,
destroy: destroy ?? this.destroy,
);
}