UniqueGift class abstract

This object describes a unique gift that was upgraded from a regular gift.

Available extensions
Annotations
  • @freezed

Constructors

UniqueGift({@JsonKey.new(name: 'gift_id') required String giftId, @JsonKey.new(name: 'base_name') required String baseName, @JsonKey.new(name: 'name') required String name, @JsonKey.new(name: 'number') required int number, @JsonKey.new(name: 'model') required UniqueGiftModel model, @JsonKey.new(name: 'symbol') required UniqueGiftSymbol symbol, @JsonKey.new(name: 'backdrop') required UniqueGiftBackdrop backdrop, @JsonKey.new(name: 'publisher_chat') Chat? publisherChat, @JsonKey.new(name: 'is_from_blockchain') bool? isFromBlockchain, @JsonKey.new(name: 'is_premium') bool? isPremium, @JsonKey.new(name: 'colors') UniqueGiftColors? colors, @JsonKey.new(name: 'is_burned') bool? isBurned})
Creates a new UniqueGift object.
const
factory
UniqueGift.fromJson(Map<String, dynamic> json)
Creates a new UniqueGift object from a JSON Map.
factory

Properties

backdrop → UniqueGiftBackdrop
Backdrop of the gift
no setterinherited
baseName → String
Human-readable name of the regular gift from which this unique gift was upgraded
no setterinherited
colors → UniqueGiftColors?
Optional. The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews; for business account gifts and gifts that are currently on sale only
no setterinherited
copyWith → $UniqueGiftCopyWith<UniqueGift>
Create a copy of UniqueGift with the given fields replaced by the non-null parameter values.
no setterinherited
giftId → String
Identifier of the regular gift from which the gift was upgraded
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isBurned → bool?
Optional. True, if the gift was used to craft another gift and isn't available anymore
no setterinherited
isFromBlockchain → bool?
Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram
no setterinherited
isPremium → bool?
Optional. True, if the gift can only be purchased by Telegram Premium subscribers
no setterinherited
model → UniqueGiftModel
Model of the gift
no setterinherited
name → String
Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas
no setterinherited
number → int
Unique number of the upgraded gift among gifts upgraded from the same regular gift
no setterinherited
publisherChat → Chat?
Optional. Information about the chat that published the gift
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
symbol → UniqueGiftSymbol
Symbol of the gift
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_UniqueGift value)) → TResult

Available on UniqueGift, provided by the UniqueGiftPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_UniqueGift value)?) → TResult?

Available on UniqueGift, provided by the UniqueGiftPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_UniqueGift value)?, {required TResult orElse()}) → TResult

Available on UniqueGift, provided by the UniqueGiftPatterns extension

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

Operators

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