copyWith method

LineItem copyWith({
  1. String? id,
  2. String? categoryId,
  3. String? name,
  4. String? description,
  5. int? quantity,
  6. String? gtin,
  7. String? imageUrl,
  8. String? brand,
  9. String? externalItemId,
  10. ItemAmount? itemAmount,
})

Implementation

LineItem copyWith({
  String? id,
  String? categoryId,
  String? name,
  String? description,
  int? quantity,
  String? gtin,
  String? imageUrl,
  String? brand,
  String? externalItemId,
  ItemAmount? itemAmount,
}) {
  return LineItem(
    id: id ?? this.id,
    categoryId: categoryId ?? this.categoryId,
    name: name ?? this.name,
    description: description ?? this.description,
    quantity: quantity ?? this.quantity,
    gtin: gtin ?? this.gtin,
    imageUrl: imageUrl ?? this.imageUrl,
    brand: brand ?? this.brand,
    externalItemId: externalItemId ?? this.externalItemId,
    itemAmount: itemAmount ?? this.itemAmount,
  );
}