toJson method
Creates a json from the object
Implementation
Map toJson() {
return {
'message_id': messageId,
'from': from,
'sender_chat': senderChat,
'date': date,
'chat': chat,
'forward_from': forwardFrom,
'forward_from_chat': forwardFromChat,
'forward_from_message_id': forwardFromMessageId,
'forward_signature': forwardSignature,
'forward_sender_name': forwardSenderName,
'forward_date': forwardDate,
'is_automatic_forward': isAutomaticForward,
'reply_to_message': replyToMessage,
'via_bot': viaBot,
'edit_date': editDate,
'has_protected_content': hasProtectedContent,
'media_group_id': mediaGroupId,
'author_signature': authorSignature,
'text': text,
'entities': entities,
'animation': animation,
'audio': audio,
'document': document,
'photo': photo,
'sticker': sticker,
'video': video,
'video_note': videoNote,
'voice': voice,
'caption': caption,
'captionEntities': captionEntities,
'contact': contact,
'dice': dice,
'game': game,
'poll': poll,
'venue': venue,
'location': location,
'new_chat_members': newChatMembers,
'left_chat_member': leftChatMember,
'new_chat_title': newChatTitle,
'new_chat_photo': newChatPhoto,
'delete_chat_photo': deleteChatPhoto,
'group_chat_created': groupChatCreated,
'supergroup_chat_created': supergroupChatCreated,
'channel_chat_created': channelChatCreated,
'message_auto_delete_timer_changed': messageAutoDeleteTimerChanged,
'migrate_to_chat_id': migrateToChatId,
'migrate_from_chat_id': migrateFromChatId,
'pinned_message': pinnedMessage,
'invoice': invoice,
'successful_payment': successfulPayment,
'connected_website': connectedWebsite,
'passport_data': passportData,
'proximity_alert_triggered': proximityAlertTriggered,
'video_chat_scheduled': videoChatScheduled,
'video_chat_started': videoChatStarted,
'video_chat_ended': videoChatEnded,
'video_chat_participants_invited': videoChatParticipantsInvited,
'web_app_data': webAppData,
'reply_markup': replyMarkup,
}..removeWhere((_, v) => v == null);
}