copyWith method

ProductContentModel copyWith({
  1. int? id,
  2. String? productCode,
  3. String? productName,
  4. int? totalOrderedQuantity,
  5. int scannedQty = 0,
  6. List<OrderDetails>? orderDetails,
  7. List<SingleScannedModel>? iccidList,
  8. List<RangeScannedModel>? rangeList,
  9. List<int>? scannedserialNums,
})

Implementation

ProductContentModel copyWith(
    {int? id,
    String? productCode,
    String? productName,
    int? totalOrderedQuantity,
    int scannedQty = 0,
    List<OrderDetails>? orderDetails,
    List<SingleScannedModel>? iccidList,
    List<RangeScannedModel>? rangeList,
    List<int>? scannedserialNums}) {
  return ProductContentModel(
    id: id ?? this.id,
    productCode: productCode ?? this.productCode,
    productName: productName ?? this.productName,
    orderDetails: orderDetails ?? this.orderDetails,
    totalOrderedQuantity: totalOrderedQuantity ?? this.totalOrderedQuantity,
    scannedQty: scannedQty,
    iccidList: iccidList ?? this.iccidList,
    rangeList: rangeList ?? this.rangeList,
    scannedserialNums: scannedserialNums ?? this.scannedserialNums,
  );
}