GiveawayWinners class abstract

This object represents a message about the completion of a giveaway with public winners.

Implemented types
Available extensions
Annotations
  • @freezed

Constructors

GiveawayWinners({@JsonKey.new(name: 'chat') required Chat chat, @JsonKey.new(name: 'giveaway_message_id') required int giveawayMessageId, @JsonKey.new(name: 'winners_selection_date') required int winnersSelectionDate, @JsonKey.new(name: 'winner_count') required int winnerCount, @JsonKey.new(name: 'winners') required List<User> winners, @JsonKey.new(name: 'additional_chat_count') int? additionalChatCount, @JsonKey.new(name: 'premium_subscription_month_count') int? premiumSubscriptionMonthCount, @JsonKey.new(name: 'unclaimed_prize_count') int? unclaimedPrizeCount, @JsonKey.new(name: 'only_new_members') bool? onlyNewMembers, @JsonKey.new(name: 'was_refunded') bool? wasRefunded, @JsonKey.new(name: 'prize_description') String? prizeDescription, @JsonKey.new(name: 'prize_star_count') int? prizeStarCount})
Constructor
const
factory
GiveawayWinners.fromJson(Map<String, dynamic> json)
Constructor from JSON data
factory

Properties

additionalChatCount → int?
The number of other chats the user had to join in order to be eligible for the giveaway
no setterinherited
chat → Chat
The chat that created the giveaway
no setterinherited
copyWith → $GiveawayWinnersCopyWith<GiveawayWinners>
Create a copy of GiveawayWinners with the given fields replaced by the non-null parameter values.
no setterinherited
giveawayMessageId → int
Identifier of the messsage with the giveaway in the chat
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
onlyNewMembers → bool?
True, if only users who had joined the chats after the giveaway started were eligible to win
no setterinherited
premiumSubscriptionMonthCount → int?
The number of months the Telegram Premium subscription won from the giveaway will be active for
no setterinherited
prizeDescription → String?
Description of additional giveaway prize
no setterinherited
prizeStarCount → int?
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unclaimedPrizeCount → int?
Number of undistributed prizes
no setterinherited
wasRefunded → bool?
True, if the giveaway was canceled because the payment for it was refunded
no setterinherited
winnerCount → int
Total number of winners in the giveaway
no setterinherited
winners → List<User>
List of up to 100 winners of the giveaway
no setterinherited
winnersSelectionDate → int
Point in time (Unix timestamp) when winners of the giveaway were selected
no setterinherited

Methods

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

Available on GiveawayWinners, provided by the GiveawayWinnersPatterns extension

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

Available on GiveawayWinners, provided by the GiveawayWinnersPatterns extension

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

Available on GiveawayWinners, provided by the GiveawayWinnersPatterns 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 GiveawayWinners to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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