recentSessions function

  1. @riverpod
Future<List<LearningSession>> recentSessions(
  1. Ref<Object?> ref
)

Implementation

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