pathEnrollments function

  1. @riverpod
Future<List<LearningPathEnrollment>> pathEnrollments(
  1. Ref<Object?> ref,
  2. String pathId
)

Implementation

@riverpod
Future<List<LearningPathEnrollment>> pathEnrollments(
  Ref ref,
  String pathId,
) async {
  final ds = ref.watch(orgDatasourceProvider);
  final models = await ds.getPathEnrollments(pathId);
  return models.map((m) => m.toEntity()).toList();
}