getUnreadCount method

Future<int> getUnreadCount(
  1. String orgId
)

Implementation

Future<int> getUnreadCount(String orgId) async {
  final response = await _client
      .from('org_notifications')
      .select()
      .eq('org_id', orgId)
      .eq('user_id', _userId)
      .isFilter('read_at', null)
      .count(CountOption.exact);
  return response.count;
}