topicTree function

  1. @riverpod
Future<List<Topic>> topicTree(
  1. Ref<Object?> ref,
  2. String domainId
)

Implementation

@riverpod
Future<List<Topic>> topicTree(Ref ref, String domainId) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  final models = await ds.getTopicTree(domainId);
  return models.map((m) => m.toEntity()).toList();
}