ReceivedGift class final

Represents a gift received by a user or a chat

Inheritance

Constructors

ReceivedGift({required String receivedGiftId, MessageSender? senderId, required FormattedText text, required int uniqueGiftNumber, required bool isPrivate, required bool isSaved, required bool isPinned, required bool canBeUpgraded, required bool canBeTransferred, required bool canBeDeleted, required bool wasRefunded, required int date, required SentGift gift, required List<int> collectionIds, required int sellStarCount, required int prepaidUpgradeStarCount, required bool isUpgradeSeparate, required int transferStarCount, required int dropOriginalDetailsStarCount, required int nextTransferDate, required int nextResaleDate, required int exportDate, required String prepaidUpgradeHash, required int craftDate, dynamic extra, int? clientId})
Represents a gift received by a user or a chat
const
ReceivedGift.fromJson(Map<String, dynamic> json)
Parses a ReceivedGift from TDLib JSON.
factory

Properties

canBeDeleted → bool
True, if the gift is a regular gift that can be deleted using deleteGift; only for the receiver of the gift
final
canBeTransferred → bool
True, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift
final
canBeUpgraded → bool
True, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
collectionIds → List<int>
Identifiers of collections to which the gift is added; only for the receiver of the gift
final
craftDate → int
Point in time (Unix timestamp) when the gift can be used to craft another gift; can be in the past; only for the receiver of the gift
final
date → int
Point in time (Unix timestamp) when the gift was sent
final
dropOriginalDetailsStarCount → int
Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift
final
exportDate → int
Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn't possible; only for the receiver of the gift
final
extra → dynamic
"@extra" of the request this object answers.
final
gift → SentGift
The gift
final
hashCode → int
The hash code for this object.
no setterinherited
isPinned → bool
True, if the gift is pinned to the top of the chat's profile page
final
isPrivate → bool
True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone is able to see them
final
isSaved → bool
True, if the gift is displayed on the chat's profile page; only for the receiver of the gift
final
isUpgradeSeparate → bool
True, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost
final
nextResaleDate → int
Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can't be resold; only for the receiver of the gift
final
nextTransferDate → int
Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn't possible; only for the receiver of the gift
final
prepaidUpgradeHash → String
If non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade
final
prepaidUpgradeStarCount → int
Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
final
receivedGiftId → String
Unique identifier of the received gift for the current user; only for the receiver of the gift
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sellStarCount → int
Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can't be sold by the current user
final
senderId → MessageSender?
Identifier of a user or a chat that sent the gift; may be null if unknown
final
text → FormattedText
Message added to the gift
final
transferStarCount → int
Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
final
uniqueGiftNumber → int
Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned
final
wasRefunded → bool
True, if the gift was refunded and isn't available anymore
final

Methods

copyWith({String? receivedGiftId, MessageSender? senderId()?, FormattedText? text, int? uniqueGiftNumber, bool? isPrivate, bool? isSaved, bool? isPinned, bool? canBeUpgraded, bool? canBeTransferred, bool? canBeDeleted, bool? wasRefunded, int? date, SentGift? gift, List<int>? collectionIds, int? sellStarCount, int? prepaidUpgradeStarCount, bool? isUpgradeSeparate, int? transferStarCount, int? dropOriginalDetailsStarCount, int? nextTransferDate, int? nextResaleDate, int? exportDate, String? prepaidUpgradeHash, int? craftDate, dynamic extra, int? clientId}) → ReceivedGift
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

CONSTRUCTOR → const String
TDLib type name.