InlineKeyboardButton.fromJson constructor
Creates an InlineKeyboardButton from JSON object
Implementation
factory InlineKeyboardButton.fromJson(Map<String, dynamic> json) {
return InlineKeyboardButton(
text: json['text'],
url: json['url'],
loginUrl: json['login_url'] != null
? LoginURL.fromJson(json['login_url'])
: null,
callbackData: json['callback_data'],
switchInlineQuery: json['switch_inline_query'],
switchInlineQueryCurrentChat: json['switch_inline_query_current_chat'],
callbackGame: json['callback_game'] != null
? CallbackGame.fromJson(json['callback_game'])
: null,
pay: json['pay'],
webApp:
json['web_app'] != null ? WebAppInfo.fromJson(json['web_app']) : null,
switchInlineQueryChosenChat:
json['switch_inline_query_chosen_chat'] != null
? SwitchInlineQueryChosenChat.fromJson(
json['switch_inline_query_chosen_chat'],
)
: null,
copyText: json['copy_text'] != null
? CopyTextButton.fromJson(json['copy_text'])
: null,
);
}