syllabusProvider top-level property

StreamProviderFamily<Syllabus?, ({int offeringId, String teacherId})> syllabusProvider
final

Provides a teacher's syllabus for an offering, fetched lazily on first watch.

Keyed by the offering id and the authoring teacher's code (from CourseOfferingDetail.teachers). Emits cached content immediately when present, blocks on the first fetch otherwise, and emits null when the teacher hasn't submitted a syllabus. The detail UI shows the first teacher's syllabus for now.

Implementation

final syllabusProvider = StreamProvider.autoDispose
    .family<Syllabus?, ({int offeringId, String teacherId})>((ref, key) {
      return ref
          .watch(courseRepositoryProvider)
          .watchSyllabus(
            offeringId: key.offeringId,
            teacherId: key.teacherId,
          );
    });