getNotificationPreferences method
- String orgId
Implementation
Future<List<NotificationPreferenceModel>> getNotificationPreferences(
String orgId,
) async {
final response = await _client
.from('notification_preferences')
.select()
.eq('user_id', _userId)
.eq('org_id', orgId);
return (response as List<dynamic>)
.map(
(row) =>
NotificationPreferenceModel.fromJson(row as Map<String, dynamic>),
)
.toList();
}