fromJson static method

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

Implementation

static CommunityAdministratorRights? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return CommunityAdministratorRights(
    canManageCommunity: (json['can_manage_community'] as bool?) ?? false,
    canChangeInfo: (json['can_change_info'] as bool?) ?? false,
    canEditChatList: (json['can_edit_chat_list'] as bool?) ?? false,
    canPromoteMembers: (json['can_promote_members'] as bool?) ?? false,
    canBanMembers: (json['can_ban_members'] as bool?) ?? false,
  );
}