toJson method

Map toJson()

Creates a json from the object

Implementation

Map toJson() {
  return {
    'text': text,
    'url': url,
    'login_url': loginUrl,
    'callback_data': callbackData,
    'web_app': webApp,
    'switch_inline_query': switchInlineQuery,
    'switch_inline_query_current_chat': switchInlineQueryCurrentChat,
    'callback_game': callbackGame,
    'pay': pay,
  }..removeWhere((_, v) => v == null);
}