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