ChatMemberRestricted.fromJson constructor

ChatMemberRestricted.fromJson(
  1. Map<String, dynamic> json
)

Creates a ChatMemberRestricted object from a Map of JSON data.

Implementation

factory ChatMemberRestricted.fromJson(Map<String, dynamic> json) {
  return ChatMemberRestricted(
    user: User.fromJson(json['user']),
    isMember: json['is_member'],
    canChangeInfo: json['can_change_info'],
    canInviteUsers: json['can_invite_users'],
    canPinMessages: json['can_pin_messages'],
    canManageTopics: json['can_manage_topics'],
    canSendMessages: json['can_send_messages'],
    canSendPolls: json['can_send_polls'],
    canSendOtherMessages: json['can_send_other_messages'],
    canAddWebPagePreviews: json['can_add_web_page_previews'],
    untilDate: json['until_date'],
    canSendAudios: json['can_send_audios'],
    canSendDocuments: json['can_send_documents'],
    canSendPhotos: json['can_send_photos'],
    canSendVideos: json['can_send_videos'],
    canSendVideoNotes: json['can_send_video_notes'],
    canSendVoiceNotes: json['can_send_voice_notes'],
  );
}