topicNotes function

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

Implementation

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