StarGiveawayPaymentOption class final

Describes an option for creating of Telegram Star giveaway. Use telegramPaymentPurposeStarGiveaway for out-of-store payments

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

StarGiveawayPaymentOption({required String currency, required int amount, required int starCount, required String storeProductId, required int yearlyBoostCount, required List<StarGiveawayWinnerOption> winnerOptions, required bool isDefault, required bool isAdditional})

Properties

amount → int
amount The amount to pay, in the smallest units of the currency
final
currency → String
currency ISO 4217 currency code for the payment
final
hashCode → int
The hash code for this object.
no setteroverride
isAdditional → bool
isAdditional True, if the option must be shown only in the full list of payment options
final
isDefault → bool
isDefault True, if the option must be chosen by default
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
starCount → int
starCount Number of Telegram Stars that will be distributed among winners
final
storeProductId → String
storeProductId Identifier of the store product associated with the option; may be empty if none
final
winnerOptions → List<StarGiveawayWinnerOption>
winnerOptions Allowed options for the number of giveaway winners
final
yearlyBoostCount → int
yearlyBoostCount Number of times the chat will be boosted for one year if the option is chosen
final

Methods

copyWith({String? currency, int? amount, int? starCount, String? storeProductId, int? yearlyBoostCount, List<StarGiveawayWinnerOption>? winnerOptions, bool? isDefault, bool? isAdditional}) → StarGiveawayPaymentOption

Available on StarGiveawayPaymentOption, provided by the StarGiveawayPaymentOptionExtensions extension

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

Operators

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

Static Methods

fromJson(Map<String, dynamic>? json) → StarGiveawayPaymentOption?

Constants

constructor → const String