Notification Settings Sync Service
Component Detail
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).
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
Related Data Entities (3)
Data entities managed by this component