getBadges method
- String orgId
Implementation
Future<List<BadgeModel>> getBadges(String orgId) async {
final response = await _client
.from('badges')
.select()
.or('org_id.is.null,org_id.eq.$orgId')
.order('name');
return (response as List<dynamic>)
.map((r) => BadgeModel.fromJson(r as Map<String, dynamic>))
.toList();
}