toJson method

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

Object to Map serializer

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '@type': 'chatPermissions',
    if (extra != null) '@extra': extra,
    'can_send_basic_messages': can_send_basic_messages,
    'can_send_audios': can_send_audios,
    'can_send_documents': can_send_documents,
    'can_send_photos': can_send_photos,
    'can_send_videos': can_send_videos,
    'can_send_video_notes': can_send_video_notes,
    'can_send_voice_notes': can_send_voice_notes,
    'can_send_polls': can_send_polls,
    'can_send_other_messages': can_send_other_messages,
    'can_add_web_page_previews': can_add_web_page_previews,
    'can_change_info': can_change_info,
    'can_invite_users': can_invite_users,
    'can_pin_messages': can_pin_messages,
    'can_manage_topics': can_manage_topics
  };
}