ChatMemberAdministrator.fromJson constructor

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

Creates a new ChatMemberAdministrator object from json.

Implementation

factory ChatMemberAdministrator.fromJson(Map<String, dynamic> json) {
  return ChatMemberAdministrator(
    user: User.fromJson(json['user']),
    canBeEdited: json['can_be_edited'],
    isAnonymous: json['is_anonymous'],
    canManageChat: json['can_manage_chat'],
    canDeleteMessages: json['can_delete_messages'],
    canManageVideoChats: json['can_manage_video_chats'],
    canRestrictMembers: json['can_restrict_members'],
    canPromoteMembers: json['can_promote_members'],
    canChangeInfo: json['can_change_info'],
    canInviteUsers: json['can_invite_users'],
    canPostMessages: json['can_post_messages'],
    canEditMessages: json['can_edit_messages'],
    canPinMessages: json['can_pin_messages'],
    canManageTopics: json['can_manage_topics'],
    customTitle: json['custom_title'],
    canPostStories: json['can_post_stories'],
    canEditStories: json['can_edit_stories'],
    canDeleteStories: json['can_delete_stories'],
  );
}