toJson method

  1. @override
Map<String, dynamic> toJson()
override

Object to Map serializer

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '@type': 'message',
    if (extra != null) '@extra': extra,
    'id': id,
    'sender_id': sender_id,
    'chat_id': chat_id,
    'sending_state': sending_state,
    'scheduling_state': scheduling_state,
    'is_outgoing': is_outgoing,
    'is_pinned': is_pinned,
    'can_be_edited': can_be_edited,
    'can_be_forwarded': can_be_forwarded,
    'can_be_saved': can_be_saved,
    'can_be_deleted_only_for_self': can_be_deleted_only_for_self,
    'can_be_deleted_for_all_users': can_be_deleted_for_all_users,
    'can_get_added_reactions': can_get_added_reactions,
    'can_get_statistics': can_get_statistics,
    'can_get_message_thread': can_get_message_thread,
    'can_get_viewers': can_get_viewers,
    'can_get_media_timestamp_links': can_get_media_timestamp_links,
    'can_report_reactions': can_report_reactions,
    'has_timestamped_media': has_timestamped_media,
    'is_channel_post': is_channel_post,
    'is_topic_message': is_topic_message,
    'contains_unread_mention': contains_unread_mention,
    'date': date,
    'edit_date': edit_date,
    'forward_info': forward_info,
    'interaction_info': interaction_info,
    'unread_reactions': unread_reactions,
    'reply_to': reply_to,
    'message_thread_id': message_thread_id,
    'self_destruct_type': self_destruct_type,
    'self_destruct_in': self_destruct_in,
    'auto_delete_in': auto_delete_in,
    'via_bot_user_id': via_bot_user_id,
    'author_signature': author_signature,
    'media_album_id': media_album_id,
    'restriction_reason': restriction_reason,
    'content': content,
    'reply_markup': reply_markup
  };
}