Service Layer low complexity mobile
1
Dependencies
1
Dependents
3
Entities
0
Integrations

Description

Riverpod service that sends PATCH requests to the backend whenever a notification preference is toggled, ensuring server-side persistence so settings survive device switches and reinstalls. Handles first-install default seeding (push categories enabled, email/SMS disabled).

Feature: Notification Settings

notification-settings-sync-service

Sources & reasoning

Preferences must survive device switches and reinstalls, which requires server-side persistence via a PATCH endpoint on each change. This service encapsulates that sync logic and the first-install default seeding described in the feature implementation notes.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • PATCH updated preference to REST API on each toggle change
  • Seed default settings on first install (push enabled, email/SMS disabled)
  • Propagate sync errors back to the UI layer
  • Coordinate with the offline cache after successful sync

Interfaces

patchSetting(String userId, String category, String channel, bool enabled) Future<void>
seedDefaults(String userId) Future<void>

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component