GiftInfo class abstract
Describes a service message about a regular gift that was sent or received.
- Annotations
-
- @freezed
Constructors
-
GiftInfo.new({@JsonKey(name: 'gift') required Gift gift, @JsonKey(name: 'owned_gift_id') String? ownedGiftId, @JsonKey(name: 'convert_star_count') int? convertStarCount, @JsonKey(name: 'prepaid_upgrade_star_count') int? prepaidUpgradeStarCount, @JsonKey(name: 'can_be_upgraded') bool? canBeUpgraded, @JsonKey(name: 'text') String? text, @JsonKey(name: 'entities') List<
MessageEntity> ? entities, @JsonKey(name: 'is_private') bool? isPrivate}) -
Creates a new GiftInfo object.
constfactory
-
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