CourseNotify.fromCourse constructor

CourseNotify.fromCourse({
  1. required int id,
  2. required Course course,
  3. required int weekday,
  4. required TimeCode timeCode,
})

Implementation

factory CourseNotify.fromCourse({
  required int id,
  required Course course,
  required int weekday,
  required TimeCode timeCode,
}) {
  return CourseNotify(
    id: id,
    title: course.title,
    code: course.code,
    startTime: timeCode.startTime,
    weekday: weekday,
    location: course.location.toString(),
  );
}