copyWith method

Item copyWith({
  1. String? id,
  2. String? description,
  3. int? priceCents,
  4. int? quantity,
  5. String? createdAt,
  6. String? updatedAt,
  7. String? price,
  8. bool? destroy,
})

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