getObjectives method

Future<List<LearningObjectiveModel>> getObjectives(
  1. String orgId
)

Implementation

Future<List<LearningObjectiveModel>> getObjectives(String orgId) async {
  final response = await _client
      .from('learning_objectives')
      .select()
      .eq('org_id', orgId)
      .order('created_at', ascending: false);
  return (response as List<dynamic>)
      .map(
        (row) => LearningObjectiveModel.fromJson(row as Map<String, dynamic>),
      )
      .toList();
}