copyWith method
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
PremiumPaymentOption copyWith({
String? currency,
int? amount,
int? discountPercentage,
int? monthCount,
String? storeProductId,
InternalLinkType? Function()? paymentLink,
}) =>
PremiumPaymentOption(
currency: currency ?? this.currency,
amount: amount ?? this.amount,
discountPercentage: discountPercentage ?? this.discountPercentage,
monthCount: monthCount ?? this.monthCount,
storeProductId: storeProductId ?? this.storeProductId,
paymentLink: paymentLink != null ? paymentLink() : this.paymentLink,
);