getCertifications method

Future<List<CertificationModel>> getCertifications(
  1. String orgId
)

Implementation

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