CourseTableData typedef
Scheduled course table grid data and unscheduled courses, with pre-computed layout metadata for the course table UI.
Implementation
typedef CourseTableData = ({
/// Maps `(dayOfWeek, period)` grid positions to cell data.
///
/// Only the start slot of a multi-period block has an entry; subsequent
/// slots covered by [CourseTableCellData.span] are absent from the map.
Map<({DayOfWeek day, Period period}), CourseTableCellData> scheduled,
/// Courses with no assigned schedule slots (e.g., thesis, internship).
List<CourseTableCellData> unscheduled,
/// Whether any course falls on a weekday (Mon-Fri).
bool hasWeekdayCourse,
/// Whether any course falls on Saturday.
bool hasSaturdayCourse,
/// Whether any course falls on Sunday.
bool hasSundayCourse,
/// Whether any course falls in the morning period (1-4).
bool hasAMCourse,
/// Whether any course falls in the afternoon period (5-9).
bool hasPMCourse,
/// Whether any course falls in the noon period (N).
bool hasNoonCourse,
/// Whether any course falls in the evening period (A-D).
bool hasEveningCourse,
/// Earliest period that has a course, or null if empty.
Period? earliestPeriod,
/// Latest period that has a course (accounting for span), or null if empty.
Period? latestPeriod,
/// Sum of credits across all distinct courses (scheduled + unscheduled).
double totalCredits,
/// Sum of hours across all distinct courses (scheduled + unscheduled).
int totalHours,
});