copyWith method

  1. @override
MessageGiftedGrams copyWith({
  1. int? gifterUserId,
  2. int? receiverUserId,
  3. int? gramAmount,
  4. String? transactionId,
  5. 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
MessageGiftedGrams copyWith({
  int? gifterUserId,
  int? receiverUserId,
  int? gramAmount,
  String? transactionId,
  Sticker? Function()? sticker,
}) => MessageGiftedGrams(
  gifterUserId: gifterUserId ?? this.gifterUserId,
  receiverUserId: receiverUserId ?? this.receiverUserId,
  gramAmount: gramAmount ?? this.gramAmount,
  transactionId: transactionId ?? this.transactionId,
  sticker: sticker != null ? sticker() : this.sticker,
);