Gift class abstract
Represents a gift that can be sent by the bot.
- Annotations
-
- @freezed
Constructors
- Gift.new({@JsonKey(name: 'id') required String id, @JsonKey(name: 'sticker') required Sticker sticker, @JsonKey(name: 'star_count') required int starCount, @JsonKey(name: 'total_count') int? totalCount, @JsonKey(name: 'remaining_count') int? remainingCount, @JsonKey(name: 'upgrade_star_count') int? upgradeStarCount})
-
Creates a Gift object.
constfactory
-
Gift.fromJson(Map<
String, dynamic> json) -
Creates a Gift object from a JSON map.
factory
Properties
-
copyWith
→ $GiftCopyWith<
Gift> -
Create a copy of Gift
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of the gift.
no setterinherited
- remainingCount → int?
-
Optional. The number of remaining gifts of this type that can be sent;
for limited gifts only.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- starCount → int
-
The number of Telegram Stars that must be paid to send the sticker.
no setterinherited
- sticker → Sticker
-
The sticker that represents the gift.
no setterinherited
- totalCount → int?
-
Optional. The total number of gifts of this type that can be sent; for
limited gifts only.
no setterinherited
- upgradeStarCount → int?
-
Optional. The number of Telegram Stars that must be paid to upgrade the
gift to a unique one.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Gift to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited