Gift constructor
const
Gift({
- @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,
- @JsonKey(name: 'publisher_chat') Chat? publisherChat,
Creates a Gift object.
Implementation
const factory Gift({
/// Unique identifier of the gift.
@JsonKey(name: 'id') required String id,
/// The sticker that represents the gift.
@JsonKey(name: 'sticker') required Sticker sticker,
/// The number of Telegram Stars that must be paid to send the sticker.
@JsonKey(name: 'star_count') required int starCount,
/// Optional. The total number of gifts of this type that can be sent; for
/// limited gifts only.
@JsonKey(name: 'total_count') int? totalCount,
/// Optional. The number of remaining gifts of this type that can be sent;
/// for limited gifts only.
@JsonKey(name: 'remaining_count') int? remainingCount,
/// Optional. The number of Telegram Stars that must be paid to upgrade the
/// gift to a unique one.
@JsonKey(name: 'upgrade_star_count') int? upgradeStarCount,
/// Optional. Information about the chat that published the gift
@JsonKey(name: 'publisher_chat') Chat? publisherChat,
}) = _Gift;