copyWith method

  1. @override
PaymentReceiptTypeRegular copyWith({
  1. int? paymentProviderUserId,
  2. Invoice? invoice,
  3. OrderInfo? orderInfo()?,
  4. ShippingOption? shippingOption()?,
  5. String? credentialsTitle,
  6. int? tipAmount,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
PaymentReceiptTypeRegular copyWith({
  int? paymentProviderUserId,
  Invoice? invoice,
  OrderInfo? Function()? orderInfo,
  ShippingOption? Function()? shippingOption,
  String? credentialsTitle,
  int? tipAmount,
}) => PaymentReceiptTypeRegular(
  paymentProviderUserId: paymentProviderUserId ?? this.paymentProviderUserId,
  invoice: invoice ?? this.invoice,
  orderInfo: orderInfo != null ? orderInfo() : this.orderInfo,
  shippingOption: shippingOption != null
      ? shippingOption()
      : this.shippingOption,
  credentialsTitle: credentialsTitle ?? this.credentialsTitle,
  tipAmount: tipAmount ?? this.tipAmount,
);