SuggestedPostPrice class abstract

Describes the price of a suggested post.

This object contains information about the pricing for a suggested post, including the currency and amount that will be paid.

Available extensions
Annotations
  • @freezed

Constructors

SuggestedPostPrice.new({@JsonKey(name: 'currency') required String currency, @JsonKey(name: 'amount') required int amount})
Creates a new SuggestedPostPrice object.
const
factory
SuggestedPostPrice.fromJson(Map<String, dynamic> json)
Creates a new SuggestedPostPrice object from a JSON Map.
factory

Properties

amount int
The amount of the currency that will be paid for the post in the smallest units of the currency.
no setterinherited
copyWith → $SuggestedPostPriceCopyWith<SuggestedPostPrice>
Create a copy of SuggestedPostPrice with the given fields replaced by the non-null parameter values.
no setterinherited
currency String
Currency in which the post will be paid.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isStars bool

Available on SuggestedPostPrice, provided by the SuggestedPostPriceExt extension

Returns true if the currency is Telegram Stars (XTR).
no setter
isToncoins bool

Available on SuggestedPostPrice, provided by the SuggestedPostPriceExt extension

Returns true if the currency is toncoins (TON).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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