getLearningPaths method

Future<List<LearningPathModel>> getLearningPaths(
  1. String orgId
)

Implementation

Future<List<LearningPathModel>> getLearningPaths(String orgId) async {
  final response = await _client
      .from('learning_paths')
      .select('*, learning_path_steps(*, domains(name))')
      .eq('org_id', orgId)
      .order('created_at');
  return (response as List<dynamic>)
      .map((r) => LearningPathModel.fromJson(r as Map<String, dynamic>))
      .toList();
}