copyWith method

ProductContentModel copyWith({
  1. int? id,
  2. String? productCode,
  3. String? productId,
  4. String? productName,
  5. String? productDescription,
  6. String? productImage,
  7. int? totalOrderedQuantity,
  8. int scannedQty = 0,
  9. double? itemAmount,
  10. double? itemTax,
  11. double? unitDiscount,
  12. double? sellingPrice,
  13. double? unitSellingPrice,
  14. List<OrderDetails>? orderDetails,
  15. List<SingleScannedModel>? iccidList,
  16. List<RangeScannedModel>? rangeList,
  17. List<int>? scannedserialNums,
})

Implementation

ProductContentModel copyWith(
    {int? id,
    String? productCode,
    String? productId,
    String? productName,
    String? productDescription,
    String? productImage,
    int? totalOrderedQuantity,
    int scannedQty = 0,
    double? itemAmount,
    double? itemTax,
    double? unitDiscount,
    double? sellingPrice,
    double? unitSellingPrice,
    List<OrderDetails>? orderDetails,
    List<SingleScannedModel>? iccidList,
    List<RangeScannedModel>? rangeList,
    List<int>? scannedserialNums}) {
  return ProductContentModel(
    id: id ?? this.id,
    productCode: productCode ?? this.productCode,
    productId: productId ?? this.productId,
    productName: productName ?? this.productName,
    productDescription: productDescription ?? this.productDescription,
    productImage: productImage ?? this.productImage,
    itemAmount: itemAmount ?? this.itemAmount,
    itemTax: itemTax ?? this.itemTax,
    unitDiscount: unitDiscount ?? this.unitDiscount,
    unitSellingPrice: unitSellingPrice ?? this.unitSellingPrice,
    sellingPrice: sellingPrice ?? this.sellingPrice,
    orderDetails: orderDetails ?? this.orderDetails,
    totalOrderedQuantity: totalOrderedQuantity ?? this.totalOrderedQuantity,
    scannedQty: scannedQty,
    iccidList: iccidList ?? this.iccidList,
    rangeList: rangeList ?? this.rangeList,
    scannedserialNums: scannedserialNums ?? this.scannedserialNums,
  );
}