copyWith method
MessageGiftedPremium
copyWith({
- int? gifterUserId,
- int? receiverUserId,
- FormattedText? text,
- String? currency,
- int? amount,
- String? cryptocurrency,
- int? cryptocurrencyAmount,
- int? monthCount,
- int? dayCount,
- 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,
int? receiverUserId,
FormattedText? text,
String? currency,
int? amount,
String? cryptocurrency,
int? cryptocurrencyAmount,
int? monthCount,
int? dayCount,
Sticker? Function()? sticker,
}) => MessageGiftedPremium(
gifterUserId: gifterUserId ?? this.gifterUserId,
receiverUserId: receiverUserId ?? this.receiverUserId,
text: text ?? this.text,
currency: currency ?? this.currency,
amount: amount ?? this.amount,
cryptocurrency: cryptocurrency ?? this.cryptocurrency,
cryptocurrencyAmount: cryptocurrencyAmount ?? this.cryptocurrencyAmount,
monthCount: monthCount ?? this.monthCount,
dayCount: dayCount ?? this.dayCount,
sticker: sticker != null ? sticker() : this.sticker,
);