Giveaway class abstract

This object represents a message about a scheduled giveaway.

Annotations
  • @freezed

Constructors

Giveaway.new({@JsonKey(name: 'chats') required List<Chat> chats, @JsonKey(name: 'winners_selection_date') required int winnersSelectionDate, @JsonKey(name: 'winner_count') required int winnerCount, @JsonKey(name: 'only_new_members') bool? onlyNewMembers, @JsonKey(name: 'has_public_winners') bool? hasPublicWinners, @JsonKey(name: 'prize_description') String? prizeDescription, @JsonKey(name: 'country_codes') List<String>? countryCodes, @JsonKey(name: 'premium_subscription_month_count') int? premiumSubscriptionMonthCount, @JsonKey(name: 'prize_star_count') int? prizeStarCount})
Constructor
const
factory
Giveaway.fromJson(Map<String, dynamic> json)
Constructor from JSON data
factory

Properties

chats List<Chat>
The list of chats which the user must join to participate in the giveaway
no setterinherited
copyWith → $GiveawayCopyWith<Giveaway>
Create a copy of Giveaway with the given fields replaced by the non-null parameter values.
no setterinherited
countryCodes List<String>?
A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasPublicWinners bool?
True, if the list of giveaway winners will be visible to everyone
no setterinherited
onlyNewMembers bool?
True, if only users who join the chats after the giveaway started should be 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
winnerCount int
The number of users which are supposed to be selected as winners of the giveaway
no setterinherited
winnersSelectionDate int
Point in time (Unix timestamp) when winners of the giveaway will be selected
no setterinherited

Methods

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

Operators

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