copyWith method

BasketItem copyWith({
  1. String? id,
  2. String? name,
  3. String? category1,
  4. String? category2,
  5. BasketItemType? itemType,
  6. String? price,
  7. String? subMerchantKey,
  8. String? subMerchantPrice,
})

Implementation

BasketItem copyWith({
  String? id,
  String? name,
  String? category1,
  String? category2,
  BasketItemType? itemType,
  String? price,
  String? subMerchantKey,
  String? subMerchantPrice,
}) {
  return BasketItem(
    id: id ?? this.id,
    name: name ?? this.name,
    category1: category1 ?? this.category1,
    category2: category2 ?? this.category2,
    itemType: itemType ?? this.itemType,
    price: price ?? this.price,
    subMerchantKey: subMerchantKey ?? this.subMerchantKey,
    subMerchantPrice: subMerchantPrice ?? this.subMerchantPrice,
  );
}