Data Layer low complexity mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Data access layer for user preferences, bridging local shared_preferences storage and the Supabase accessibility_preferences and theme_configs tables. Provides typed read/write operations and handles serialization of preference objects. Abstracts the dual-storage strategy from the service layer.

Feature: Settings & Preferences

preferences-repository

Responsibilities

  • Read and write preferences to local shared_preferences store
  • Fetch and upsert accessibility_preferences and theme_configs rows in Supabase
  • Serialize and deserialize preference data models
  • Handle conflict resolution between local and remote preference values

Interfaces

getLocalPreference<T>(String key)
setLocalPreference<T>(String key, T value)
getRemotePreferences(String userId)
upsertRemotePreferences(String userId, Map<String, dynamic> data)
getThemeConfig(String userId)
upsertThemeConfig(String userId, Map<String, dynamic> data)
clearLocal()
deleteRemotePreferences(String userId)

Related Data Entities (2)

Data entities managed by this component