copyWith method

  1. @override
OrderModel copyWith({
  1. String? documentID,
  2. String? appId,
  3. MemberModel? customer,
  4. String? name,
  5. String? email,
  6. String? shipStreet1,
  7. String? shipStreet2,
  8. String? shipCity,
  9. String? shipState,
  10. String? postcode,
  11. String? country,
  12. bool? invoiceSame,
  13. String? invoiceStreet1,
  14. String? invoiceStreet2,
  15. String? invoiceCity,
  16. String? invoiceState,
  17. String? invoicePostcode,
  18. String? invoiceCountry,
  19. List<OrderItemModel>? products,
  20. double? totalPrice,
  21. String? currency,
  22. String? paymentReference,
  23. String? shipmentReference,
  24. String? deliveryReference,
  25. String? paymentNote,
  26. String? shipmentNote,
  27. String? deliveryNote,
  28. OrderStatus? status,
  29. String? timeStamp,
})
override

Implementation

@override
OrderModel copyWith({
  String? documentID,
  String? appId,
  MemberModel? customer,
  String? name,
  String? email,
  String? shipStreet1,
  String? shipStreet2,
  String? shipCity,
  String? shipState,
  String? postcode,
  String? country,
  bool? invoiceSame,
  String? invoiceStreet1,
  String? invoiceStreet2,
  String? invoiceCity,
  String? invoiceState,
  String? invoicePostcode,
  String? invoiceCountry,
  List<OrderItemModel>? products,
  double? totalPrice,
  String? currency,
  String? paymentReference,
  String? shipmentReference,
  String? deliveryReference,
  String? paymentNote,
  String? shipmentNote,
  String? deliveryNote,
  OrderStatus? status,
  String? timeStamp,
}) {
  return OrderModel(
    documentID: documentID ?? this.documentID,
    appId: appId ?? this.appId,
    customer: customer ?? this.customer,
    name: name ?? this.name,
    email: email ?? this.email,
    shipStreet1: shipStreet1 ?? this.shipStreet1,
    shipStreet2: shipStreet2 ?? this.shipStreet2,
    shipCity: shipCity ?? this.shipCity,
    shipState: shipState ?? this.shipState,
    postcode: postcode ?? this.postcode,
    country: country ?? this.country,
    invoiceSame: invoiceSame ?? this.invoiceSame,
    invoiceStreet1: invoiceStreet1 ?? this.invoiceStreet1,
    invoiceStreet2: invoiceStreet2 ?? this.invoiceStreet2,
    invoiceCity: invoiceCity ?? this.invoiceCity,
    invoiceState: invoiceState ?? this.invoiceState,
    invoicePostcode: invoicePostcode ?? this.invoicePostcode,
    invoiceCountry: invoiceCountry ?? this.invoiceCountry,
    products: products ?? this.products,
    totalPrice: totalPrice ?? this.totalPrice,
    currency: currency ?? this.currency,
    paymentReference: paymentReference ?? this.paymentReference,
    shipmentReference: shipmentReference ?? this.shipmentReference,
    deliveryReference: deliveryReference ?? this.deliveryReference,
    paymentNote: paymentNote ?? this.paymentNote,
    shipmentNote: shipmentNote ?? this.shipmentNote,
    deliveryNote: deliveryNote ?? this.deliveryNote,
    status: status ?? this.status,
    timeStamp: timeStamp ?? this.timeStamp,
  );
}