copyWith method

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