topicProgress function

  1. @riverpod
Future<UserTopicProgressModel?> topicProgress(
  1. Ref<Object?> ref,
  2. String topicId
)

Single topic progress (used by lesson viewer to show read state).

Implementation

@riverpod
Future<UserTopicProgressModel?> topicProgress(Ref ref, String topicId) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  return ds.getProgress(topicId);
}