goals function

  1. @riverpod
Future<List<LearningGoal>> goals(
  1. Ref<Object?> ref
)

Implementation

@riverpod
Future<List<LearningGoal>> goals(Ref ref) async {
  final ds = ref.watch(supabaseDatasourceProvider);
  final models = await ds.getGoals();
  return models.map((m) => m.toEntity()).toList();
}