GiftInfo class abstract

Describes a service message about a regular gift that was sent or received.

Annotations
  • @freezed

Constructors

GiftInfo({@JsonKey.new(name: 'gift') required Gift gift, @JsonKey.new(name: 'owned_gift_id') String? ownedGiftId, @JsonKey.new(name: 'convert_star_count') int? convertStarCount, @JsonKey.new(name: 'prepaid_upgrade_star_count') int? prepaidUpgradeStarCount, @JsonKey.new(name: 'can_be_upgraded') bool? canBeUpgraded, @JsonKey.new(name: 'text') String? text, @JsonKey.new(name: 'entities') List<MessageEntity>? entities, @JsonKey.new(name: 'is_private') bool? isPrivate})
Creates a new GiftInfo object.
const
factory
GiftInfo.fromJson(Map<String, dynamic> json)
Creates a new GiftInfo object from a JSON Map.
factory

Properties

canBeUpgraded → bool?
Optional. True, if the gift can be upgraded to a unique gift
no setterinherited
convertStarCount → int?
Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible
no setterinherited
copyWith → $GiftInfoCopyWith<GiftInfo>
Create a copy of GiftInfo with the given fields replaced by the non-null parameter values.
no setterinherited
entities → List<MessageEntity>?
Optional. Special entities that appear in the text
no setterinherited
gift → Gift
Information about the gift
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isPrivate → bool?
Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
no setterinherited
ownedGiftId → String?
Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
no setterinherited
prepaidUpgradeStarCount → int?
Optional. Number of Telegram Stars that were prepaid by the sender for the ability to upgrade the gift
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
Optional. Text of the message that was added to the gift
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this GiftInfo to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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