enum SupportedSchool { uestcGraduate('uestc_graduate', '电子科技大学(研究生)', '研究生课表与考试安排'), uestcUndergraduate('uestc_undergraduate', '电子科技大学(本科生)', '手动导入课表 · 自动查询考试'); const SupportedSchool(this.id, this.label, this.description); final String id, label, description; static SupportedSchool fromId(String id) => values.firstWhere( (s) => s.id == id, orElse: () => throw const FormatException('学校标识无效'), ); }