GiveawayCompleted class abstract

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

Available extensions
Annotations
  • @freezed

Constructors

GiveawayCompleted({@JsonKey.new(name: 'winner_count') required int winnerCount, @JsonKey.new(name: 'unclaimed_prize_count') int? unclaimedPrizeCount, @JsonKey.new(name: 'giveaway_message') Message? giveawayMessage, @JsonKey.new(name: 'is_star_giveaway') bool? isStarGiveaway})
Constructor
const
factory
GiveawayCompleted.fromJson(Map<String, dynamic> json)
Constructor from JSON data
factory

Properties

copyWith → $GiveawayCompletedCopyWith<GiveawayCompleted>
Create a copy of GiveawayCompleted with the given fields replaced by the non-null parameter values.
no setterinherited
giveawayMessage Message?
Message with the giveaway that was completed, if it wasn't deleted
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isStarGiveaway bool?
Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unclaimedPrizeCount int?
Number of undistributed prizes
no setterinherited
winnerCount int
Number of winners in the giveaway
no setterinherited

Methods

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

Available on GiveawayCompleted, provided by the GiveawayCompletedPatterns extension

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

Available on GiveawayCompleted, provided by the GiveawayCompletedPatterns extension

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

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

Operators

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