copyWith method

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