feat: add two-tab timetable UI and glass dock
This commit is contained in:
@@ -79,8 +79,9 @@ class AppSnapshot {
|
||||
}
|
||||
final s = Map<String, dynamic>.from(json['settings'] as Map);
|
||||
final minutes = s['reminderMinutes'] as int;
|
||||
if (![5, 10, 15, 30, 60].contains(minutes))
|
||||
if (![5, 10, 15, 30, 60].contains(minutes)) {
|
||||
throw const FormatException('提醒时间无效');
|
||||
}
|
||||
final color = s['singleColorArgb'] as int;
|
||||
if (color < 0 || color > 0xFFFFFFFF) throw const FormatException('颜色无效');
|
||||
final sem = s['semester'];
|
||||
|
||||
@@ -49,8 +49,9 @@ class Course {
|
||||
}
|
||||
|
||||
final rawWeeks = json['weeks'];
|
||||
if (rawWeeks is! List || rawWeeks.any((w) => w is! int))
|
||||
if (rawWeeks is! List || rawWeeks.any((w) => w is! int)) {
|
||||
throw const FormatException('周次必须是整数数组');
|
||||
}
|
||||
return Course(
|
||||
id: text('id'),
|
||||
name: text('name'),
|
||||
|
||||
Reference in New Issue
Block a user