updateNotificationPreference method

Future<void> updateNotificationPreference({
  1. required String orgId,
  2. required String notificationType,
  3. required String channel,
  4. required bool enabled,
})

Implementation

Future<void> updateNotificationPreference({
  required String orgId,
  required String notificationType,
  required String channel,
  required bool enabled,
}) async {
  await _client.from('notification_preferences').upsert({
    'user_id': _userId,
    'org_id': orgId,
    'notification_type': notificationType,
    'channel': channel,
    'enabled': enabled,
  });
}