copyWith method

Invoice copyWith({
  1. String? currency,
  2. List<LabeledPricePart>? priceParts,
  3. int? maxTipAmount,
  4. List<int>? suggestedTipAmounts,
  5. String? recurringPaymentTermsOfServiceUrl,
  6. bool? isTest,
  7. bool? needName,
  8. bool? needPhoneNumber,
  9. bool? needEmailAddress,
  10. bool? needShippingAddress,
  11. bool? sendPhoneNumberToProvider,
  12. bool? sendEmailAddressToProvider,
  13. bool? isFlexible,
})

Implementation

Invoice copyWith({
  String? currency,
  List<LabeledPricePart>? priceParts,
  int? maxTipAmount,
  List<int>? suggestedTipAmounts,
  String? recurringPaymentTermsOfServiceUrl,
  bool? isTest,
  bool? needName,
  bool? needPhoneNumber,
  bool? needEmailAddress,
  bool? needShippingAddress,
  bool? sendPhoneNumberToProvider,
  bool? sendEmailAddressToProvider,
  bool? isFlexible,
}) =>
    Invoice(
      currency: currency ?? this.currency,
      priceParts: priceParts ?? this.priceParts,
      maxTipAmount: maxTipAmount ?? this.maxTipAmount,
      suggestedTipAmounts: suggestedTipAmounts ?? this.suggestedTipAmounts,
      recurringPaymentTermsOfServiceUrl: recurringPaymentTermsOfServiceUrl ??
          this.recurringPaymentTermsOfServiceUrl,
      isTest: isTest ?? this.isTest,
      needName: needName ?? this.needName,
      needPhoneNumber: needPhoneNumber ?? this.needPhoneNumber,
      needEmailAddress: needEmailAddress ?? this.needEmailAddress,
      needShippingAddress: needShippingAddress ?? this.needShippingAddress,
      sendPhoneNumberToProvider:
          sendPhoneNumberToProvider ?? this.sendPhoneNumberToProvider,
      sendEmailAddressToProvider:
          sendEmailAddressToProvider ?? this.sendEmailAddressToProvider,
      isFlexible: isFlexible ?? this.isFlexible,
    );