MenuButton.webApp constructor
const
MenuButton.webApp({
- @JsonKey(name: 'type') @Default(MenuButtonType.webApp) MenuButtonType type,
- @JsonKey(name: 'text') required String text,
- @JsonKey(name: 'web_app') required WebAppInfo webApp,
Represents a menu button, which launches a Web App.
Implementation
const factory MenuButton.webApp({
/// Type of the menu button
@JsonKey(name: 'type') @Default(MenuButtonType.webApp) MenuButtonType type,
/// Text on the button
@JsonKey(name: 'text') required String text,
/// 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.
///
/// Alternatively, a t.me link to a Web App of the bot can be specified in
/// the object instead of the Web App's URL, in which case the Web App will
/// be opened as if the user pressed the link.
@JsonKey(name: 'web_app') required WebAppInfo webApp,
}) = MenuButtonWebApp;