InlineKeyboardButton class
This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
Constructors
- InlineKeyboardButton({required String text, String? url, LoginURL? loginUrl, String? callbackData, String? switchInlineQuery, String? switchInlineQueryCurrentChat, CallbackGame? callbackGame, bool? pay, WebAppInfo? webApp, SwitchInlineQueryChosenChat? switchInlineQueryChosenChat, CopyTextButton? copyText})
-
This object represents one button of an inline keyboard.
const
-
InlineKeyboardButton.fromJson(Map<
String, dynamic> json) -
Creates an InlineKeyboardButton from JSON object
factory
Properties
- callbackData → String?
-
Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
final
- callbackGame → CallbackGame?
-
Optional. Description of the game that will be launched when the user presses the button.
final
- copyText → CopyTextButton?
-
Optional. Description of the button that copies the specified text to the clipboard.
final
- 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.
final
- pay → bool?
-
Optional. Specify True, to send a Pay button.
final
- 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.
final
- switchInlineQueryChosenChat → SwitchInlineQueryChosenChat?
-
Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field
final
- 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.
final
- text → String
-
Label text on the button
final
- url → String?
-
Optional. HTTP or tg:// url to be opened when button is pressed
final
- webApp → WebAppInfo?
-
Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts an InlineKeyboardButton to JSON object
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited