copyWith method

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