copyWith method

  1. @override
StorePaymentPurposePremiumGift copyWith({
  1. String? currency,
  2. int? amount,
  3. int? userId,
  4. FormattedText? text,
})
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
StorePaymentPurposePremiumGift copyWith({
  String? currency,
  int? amount,
  int? userId,
  FormattedText? text,
}) => StorePaymentPurposePremiumGift(
  currency: currency ?? this.currency,
  amount: amount ?? this.amount,
  userId: userId ?? this.userId,
  text: text ?? this.text,
);