copyWith method

  1. @override
MessageGiftedPremium copyWith({
  1. int? gifterUserId,
  2. String? currency,
  3. int? amount,
  4. String? cryptocurrency,
  5. int? cryptocurrencyAmount,
  6. int? monthCount,
  7. Sticker? sticker()?,
})
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
MessageGiftedPremium copyWith({
  int? gifterUserId,
  String? currency,
  int? amount,
  String? cryptocurrency,
  int? cryptocurrencyAmount,
  int? monthCount,
  Sticker? Function()? sticker,
}) =>
    MessageGiftedPremium(
      gifterUserId: gifterUserId ?? this.gifterUserId,
      currency: currency ?? this.currency,
      amount: amount ?? this.amount,
      cryptocurrency: cryptocurrency ?? this.cryptocurrency,
      cryptocurrencyAmount: cryptocurrencyAmount ?? this.cryptocurrencyAmount,
      monthCount: monthCount ?? this.monthCount,
      sticker: sticker != null ? sticker() : this.sticker,
    );