topicChunks function

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

Implementation

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