getByCode method

CourseNotify? getByCode(
  1. String? code,
  2. String? startTime,
  3. int weekIndex
)

Implementation

CourseNotify? getByCode(String? code, String? startTime, int weekIndex) {
  for (final CourseNotify value in data) {
    if (value.code == code &&
        value.startTime == startTime &&
        value.weekday == weekIndex) return value;
  }
  return null;
}