toJson method
Implementation
@override
Map<String, dynamic> toJson() => <String, dynamic>{
'id': id,
'sender_id': senderId?.toJson(),
'receiver_id': receiverId?.toJson(),
'chat_id': chatId,
'sending_state': sendingState?.toJson(),
'scheduling_state': schedulingState?.toJson(),
'is_outgoing': isOutgoing,
'is_pinned': isPinned,
'is_from_offline': isFromOffline,
'can_be_saved': canBeSaved,
'has_timestamped_media': hasTimestampedMedia,
'is_channel_post': isChannelPost,
'is_paid_star_suggested_post': isPaidStarSuggestedPost,
'is_paid_gram_suggested_post': isPaidGramSuggestedPost,
'contains_unread_mention': containsUnreadMention,
'contains_unread_poll_votes': containsUnreadPollVotes,
'date': date,
'edit_date': editDate,
'forward_info': forwardInfo?.toJson(),
'import_info': importInfo?.toJson(),
'interaction_info': interactionInfo?.toJson(),
'unread_reactions': unreadReactions.map((item) => item.toJson()).toList(),
'fact_check': factCheck?.toJson(),
'suggested_post_info': suggestedPostInfo?.toJson(),
'reply_to': replyTo?.toJson(),
'topic_id': topicId?.toJson(),
'self_destruct_type': selfDestructType?.toJson(),
'self_destruct_in': selfDestructIn,
'auto_delete_in': autoDeleteIn,
'via_bot_user_id': viaBotUserId,
'guest_bot_caller_id': guestBotCallerId?.toJson(),
'sender_business_bot_user_id': senderBusinessBotUserId,
'sender_boost_count': senderBoostCount,
'sender_tag': senderTag,
'paid_message_star_count': paidMessageStarCount,
'author_signature': authorSignature,
'media_album_id': mediaAlbumId.toString(),
'effect_id': effectId.toString(),
'restriction_info': restrictionInfo?.toJson(),
'summary_language_code': summaryLanguageCode,
'content': content?.toJson(),
'reply_markup': replyMarkup?.toJson(),
'ephemeral_message_id': ephemeralMessageId,
'@type': constructor,
};