copyWith method

StockDealerContentModel copyWith({
  1. int? id,
  2. int? availableQuantity,
  3. int? recommendedQuantity,
  4. int? totalOrderedQuantity,
  5. String? productCode,
  6. String? productName,
  7. String? productImage,
  8. String? outletId,
  9. List<OrderDetailsStockModel>? orderDetails,
  10. bool? isRecommended,
})

Implementation

StockDealerContentModel copyWith(
    {int? id,
    int? availableQuantity,
    int? recommendedQuantity,
    int? totalOrderedQuantity,
    String? productCode,
    String? productName,
    String? productImage,
    String? outletId,
    List<OrderDetailsStockModel>? orderDetails,
    bool? isRecommended}) {
  return StockDealerContentModel(
    id: id ?? this.id,
    availableQuantity: availableQuantity ?? this.availableQuantity,
    recommendedQuantity: recommendedQuantity ?? this.recommendedQuantity,
    totalOrderedQuantity: totalOrderedQuantity ?? this.totalOrderedQuantity,
    orderDetails: orderDetails ?? this.orderDetails,
    productCode: productCode ?? this.productCode,
    productName: productName ?? this.productName,
    productImage: productImage ?? this.productImage,
    outletId: outletId ?? this.outletId,
    isRecommended: isRecommended ?? this.isRecommended,
  );
}