copyWith method

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

Implementation

Invoice copyWith({
  String? currency,
  List<LabeledPricePart>? priceParts,
  int? maxTipAmount,
  List<int>? suggestedTipAmounts,
  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,
  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,
);