toJson method
Implementation
@override
Map<String, dynamic> toJson([dynamic extra]) {
return {
"@type": CONSTRUCTOR,
"id": id,
"sender_id": senderId.toJson(),
"chat_id": chatId,
"sending_state": sendingState?.toJson(),
"scheduling_state": schedulingState?.toJson(),
"is_outgoing": isOutgoing,
"is_pinned": isPinned,
"can_be_edited": canBeEdited,
"can_be_forwarded": canBeForwarded,
"can_be_saved": canBeSaved,
"can_be_deleted_only_for_self": canBeDeletedOnlyForSelf,
"can_be_deleted_for_all_users": canBeDeletedForAllUsers,
"can_get_added_reactions": canGetAddedReactions,
"can_get_statistics": canGetStatistics,
"can_get_message_thread": canGetMessageThread,
"can_get_viewers": canGetViewers,
"can_get_media_timestamp_links": canGetMediaTimestampLinks,
"can_report_reactions": canReportReactions,
"has_timestamped_media": hasTimestampedMedia,
"is_channel_post": isChannelPost,
"is_topic_message": isTopicMessage,
"contains_unread_mention": containsUnreadMention,
"date": date,
"edit_date": editDate,
"forward_info": forwardInfo?.toJson(),
"interaction_info": interactionInfo?.toJson(),
"unread_reactions": unreadReactions.map((i) => i.toJson()).toList(),
"reply_to": replyTo?.toJson(),
"message_thread_id": messageThreadId,
"self_destruct_time": selfDestructTime,
"self_destruct_in": selfDestructIn,
"auto_delete_in": autoDeleteIn,
"via_bot_user_id": viaBotUserId,
"author_signature": authorSignature,
"media_album_id": mediaAlbumId,
"restriction_reason": restrictionReason,
"content": content.toJson(),
"reply_markup": replyMarkup?.toJson(),
};
}