copyWith method

SellThruProductDataModel copyWith({
  1. int? page,
  2. int? size,
  3. int? totalElements,
  4. int? totalPages,
  5. bool? last,
  6. bool? first,
  7. double? totalNetAmount,
  8. double? localCurrencyGrandTotal,
  9. String? currency,
  10. String? localCurrency,
  11. double? totalDiscount,
  12. double? overallSaleTaxPercentage,
  13. double? totalAmount,
  14. double? totalTax,
  15. double? totalAmountPaid,
  16. double? ctw,
  17. String? paymentStatus,
  18. SortModel? sort,
  19. String? transactionId,
  20. String? paymentMethod,
  21. String? salesTax,
  22. String? ctwNegativeTax,
  23. String? dateTime,
  24. String? invoiceId,
  25. String? externalId,
  26. String? taxPercentage,
  27. List<ProductContentModel>? content,
})

Implementation

SellThruProductDataModel copyWith(
    {int? page,
    int? size,
    int? totalElements,
    int? totalPages,
    bool? last,
    bool? first,
    double? totalNetAmount,
    double? localCurrencyGrandTotal,
    String? currency,
    String? localCurrency,
    double? totalDiscount,
    double? overallSaleTaxPercentage,
    double? totalAmount,
    double? totalTax,
    double? totalAmountPaid,
    double? ctw,
    String? paymentStatus,
    SortModel? sort,
    String? transactionId,
    String? paymentMethod,
    String? salesTax,
    String? ctwNegativeTax,
    String? dateTime,
    String? invoiceId,
    String? externalId,
    String? taxPercentage,
    List<ProductContentModel>? content}) {
  return SellThruProductDataModel(
    page: page ?? this.page,
    size: size ?? this.size,
    totalElements: totalElements ?? this.totalElements,
    totalPages: totalPages ?? this.totalPages,
    last: last ?? this.last,
    totalNetAmount: totalNetAmount ?? this.totalNetAmount,
    totalDiscount: totalDiscount ?? this.totalDiscount,
    localCurrency: localCurrency ?? this.localCurrency,
    localCurrencyGrandTotal:
        localCurrencyGrandTotal ?? this.localCurrencyGrandTotal,
    currency: currency ?? this.currency,
    first: first ?? this.first,
    totalAmount: totalAmount ?? this.totalAmount,
    totalTax: totalTax ?? this.totalTax,
    overallSaleTaxPercentage:
        overallSaleTaxPercentage ?? this.overallSaleTaxPercentage,
    totalAmountPaid: totalAmountPaid,
    paymentStatus: paymentStatus ?? this.paymentStatus,
    sort: sort ?? this.sort,
    transactionId: transactionId ?? this.transactionId,
    paymentMethod: paymentMethod ?? this.paymentMethod,
    ctwNegativeTax: ctwNegativeTax ?? this.ctwNegativeTax,
    salesTax: salesTax ?? this.salesTax,
    ctw: ctw ?? this.ctw,
    dateTime: dateTime ?? this.dateTime,
    invoiceId: invoiceId ?? this.invoiceId,
    externalId: externalId ?? this.externalId,
    content: content ?? this.content,
    taxPercentage: taxPercentage ?? this.taxPercentage,
  );
}