getDaySchedule method Null safety

List<ClassSession> getDaySchedule(
  1. int day
)

List of class sessions on the day, returns an empty list if there is none.

Implementation

List<ClassSession> getDaySchedule(int day) => scheduleMap[day] ?? [];