toJson method
Converts a ChatMemberRestricted to a Map for JSON encoding.
Implementation
@override
Map<String, dynamic> toJson() {
return {
'status': status.value,
'user': user.toJson(),
'is_member': isMember,
'can_change_info': canChangeInfo,
'can_invite_users': canInviteUsers,
'can_pin_messages': canPinMessages,
'can_manage_topics': canManageTopics,
'can_send_messages': canSendMessages,
'can_send_polls': canSendPolls,
'can_send_other_messages': canSendOtherMessages,
'can_add_web_page_previews': canAddWebPagePreviews,
'until_date': untilDate,
'can_send_audios': canSendAudios,
'can_send_documents': canSendDocuments,
'can_send_photos': canSendPhotos,
'can_send_videos': canSendVideos,
'can_send_video_notes': canSendVideoNotes,
'can_send_voice_notes': canSendVoiceNotes,
}..removeWhere(_nullFilter);
}