copyWith method

MessageGift copyWith({
  1. Gift? gift,
  2. MessageSender? senderId,
  3. MessageSender? receiverId,
  4. String? receivedGiftId,
  5. FormattedText? text,
  6. int? uniqueGiftNumber,
  7. int? sellStarCount,
  8. int? prepaidUpgradeStarCount,
  9. bool? isUpgradeSeparate,
  10. bool? isFromAuction,
  11. bool? isPrivate,
  12. bool? isSaved,
  13. bool? isPrepaidUpgrade,
  14. bool? canBeUpgraded,
  15. bool? canBeDeleted,
  16. bool? wasConverted,
  17. bool? wasUpgraded,
  18. bool? wasRefunded,
  19. String? upgradedReceivedGiftId,
  20. String? prepaidUpgradeHash,
})

Implementation

MessageGift copyWith({
  Gift? gift,
  MessageSender? senderId,
  MessageSender? receiverId,
  String? receivedGiftId,
  FormattedText? text,
  int? uniqueGiftNumber,
  int? sellStarCount,
  int? prepaidUpgradeStarCount,
  bool? isUpgradeSeparate,
  bool? isFromAuction,
  bool? isPrivate,
  bool? isSaved,
  bool? isPrepaidUpgrade,
  bool? canBeUpgraded,
  bool? canBeDeleted,
  bool? wasConverted,
  bool? wasUpgraded,
  bool? wasRefunded,
  String? upgradedReceivedGiftId,
  String? prepaidUpgradeHash,
}) =>
    MessageGift(
      gift: gift ?? this.gift,
      senderId: senderId ?? this.senderId,
      receiverId: receiverId ?? this.receiverId,
      receivedGiftId: receivedGiftId ?? this.receivedGiftId,
      text: text ?? this.text,
      uniqueGiftNumber: uniqueGiftNumber ?? this.uniqueGiftNumber,
      sellStarCount: sellStarCount ?? this.sellStarCount,
      prepaidUpgradeStarCount:
          prepaidUpgradeStarCount ?? this.prepaidUpgradeStarCount,
      isUpgradeSeparate: isUpgradeSeparate ?? this.isUpgradeSeparate,
      isFromAuction: isFromAuction ?? this.isFromAuction,
      isPrivate: isPrivate ?? this.isPrivate,
      isSaved: isSaved ?? this.isSaved,
      isPrepaidUpgrade: isPrepaidUpgrade ?? this.isPrepaidUpgrade,
      canBeUpgraded: canBeUpgraded ?? this.canBeUpgraded,
      canBeDeleted: canBeDeleted ?? this.canBeDeleted,
      wasConverted: wasConverted ?? this.wasConverted,
      wasUpgraded: wasUpgraded ?? this.wasUpgraded,
      wasRefunded: wasRefunded ?? this.wasRefunded,
      upgradedReceivedGiftId:
          upgradedReceivedGiftId ?? this.upgradedReceivedGiftId,
      prepaidUpgradeHash: prepaidUpgradeHash ?? this.prepaidUpgradeHash,
    );