toJson method
Converts a ChatAdministratorRights to a Map for JSON encoding.
Implementation
Map<String, dynamic> toJson() {
return {
'is_anonymous': isAnonymous,
'can_manage_chat': canManageChat,
'can_delete_messages': canDeleteMessages,
'can_manage_video_chats': canManageVideoChats,
'can_restrict_members': canRestrictMembers,
'can_promote_members': canPromoteMembers,
'can_change_info': canChangeInfo,
'can_invite_users': canInviteUsers,
'can_post_messages': canPostMessages,
'can_edit_messages': canEditMessages,
'can_pin_messages': canPinMessages,
'can_manage_forum': canManageForum,
'can_post_stories': canPostStories,
'can_edit_stories': canEditStories,
'can_delete_stories': canDeleteStories,
}..removeWhere(_nullFilter);
}