InlineKeyboardButton class
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
- Annotations
-
- @JsonSerializable.new(includeIfNull: false)
Constructors
- InlineKeyboardButton({String? text, String? url, LoginUrl? loginUrl, String? callbackData, String? switchInlineQuery, String? switchInlineQueryCurrentChat, CallbackGame? callbackGame, bool? pay})
-
InlineKeyboardButton.fromJson(Map<
String, dynamic> json) -
factory
Properties
- callbackData ↔ String?
-
Optional. Data to be sent in a
callback query to the bot when button is pressed, 1-64 bytes.
getter/setter pair
- callbackGame ↔ CallbackGame?
-
Optional. Description of the game that will be launched
when the user presses the button.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- loginUrl ↔ LoginUrl?
-
Optional. An HTTP URL used to automatically authorize the user.
Can be used as a replacement for the Telegram Login Widget.
getter/setter pair
- pay ↔ bool?
-
Optional.
Specify True, to send a
Pay button.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- switchInlineQuery ↔ String?
-
Optional. If set, pressing the button will prompt the user
to select one of their chats, open that chat and insert the
bot‘s username and the specified inline query in the input field.
Can be empty, in which case just the bot’s username will be inserted.
getter/setter pair
- switchInlineQueryCurrentChat ↔ String?
-
Optional. If set, pressing the button will insert the bot‘s
username and the specified inline query in the current
chat's input field. Can be empty, in which case only the
bot’s username will be inserted.
getter/setter pair
- text ↔ String?
-
Label text on the button.
getter/setter pair
- url ↔ String?
-
Optional. HTTP or tg:// url to be opened when button is pressed.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited