toJson method
Creates a json from the object
Implementation
Map toJson() {
return {
'update_id': updateId,
'message': message,
'edited_message': editedMessage,
'channel_post': channelPost,
'edited_channel_post': editedChannelPost,
'inline_query': inlineQuery,
'chosen_inline_result': chosenInlineResult,
'callback_query': callbackQuery,
'shipping_query': shippingQuery,
'pre_checkout_query': preCheckoutQuery,
'poll': poll,
'poll_answer': pollAnswer,
'my_chat_member': myChatMember,
'chat_member': chatMember,
'chat_join_request': chatJoinRequest,
}..removeWhere((_, v) => v == null);
}