readingQuestions function

  1. @riverpod
Future<List<ReadingQuestion>> readingQuestions(
  1. Ref<Object?> ref,
  2. String topicId
)

Reading questions for active reading in the lesson viewer.

Implementation

@riverpod
Future<List<ReadingQuestion>> readingQuestions(Ref ref, String topicId) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  final models = await ds.getReadingQuestions(topicId);
  return models.map((m) => m.toEntity()).toList();
}