CourseRepository class
Provides course schedules, catalog, materials, and student rosters.
final repo = ref.watch(courseRepositoryProvider);
// Get available semesters
final semesters = await repo.getSemesters();
// Get course schedule for a semester
final courses = await repo.getCourseTable(
user: user,
semester: semesters.first,
);
// Get materials for a course
final materials = await repo.getMaterials(courses.first);
Constructors
- CourseRepository({required PortalService portalService, required CourseService courseService, required ISchoolPlusService iSchoolPlusService, required AppDatabase database, required AuthRepository authRepository})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getCourseDetails(
String courseId) → Future< Course> - Gets detailed course catalog information.
-
getCourseOffering(
int id) → Future< CourseOffering?> - Gets a course offering with related data (teachers, classrooms, schedules).
-
getCourseTable(
{required User user, required Semester semester}) → Future< CourseTableData> - Gets the course schedule for a semester.
-
getMaterialDownload(
Material material) → Future< MaterialDto> - Gets the download URL for a material.
-
getMaterials(
CourseOffering courseOffering) → Future< List< Material> > - Gets course materials (files, recordings, etc.) from I-School Plus.
-
getSemesters(
{bool refresh = false}) → Future< List< Semester> > - Gets available semesters for the authenticated student.
-
getStudents(
CourseOffering courseOffering) → Future< List< Student> > - Gets students enrolled in a course from I-School Plus.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited