Settings
Domain model representing user-configurable application settings.
This model encapsulates all editable user preferences for themes, appearance, and localization. Settings are persisted in DataStore via UserDataPreferences and observed by the app's theme system in dev.atick.app.JetpackApp to apply user preferences across the entire application.
Settings data flow:
User modifies settings in dev.atick.feature.settings.ui.SettingsScreen
dev.atick.feature.settings.ui.SettingsViewModel updates via dev.atick.data.repository.settings.SettingsRepository
Repository persists changes to DataStore immediately (no sync required)
App composable observes settings and applies theme/language changes reactively
Settings survive app restarts and device reboots (DataStore persistence)
Mapping extensions for layer conversion:
UserDataPreferences.asSettings: Convert from DataStore preferences to domain model
DarkThemeConfigPreferences.toDarkThemeConfig: Convert theme enum from preferences
DarkThemeConfig.toDarkThemeConfigPreferences: Convert theme enum to preferences
Usage context:
Applied in app-level theme configuration (dev.atick.app.JetpackApp)
Displayed and edited in settings screen
useDynamicColor enables Material You dynamic theming on Android 12+
darkThemeConfig controls light/dark/system theme preference
language controls app localization (English/Arabic)
See also
DataStore preferences model for persistence
Enum representing theme configuration options
Enum representing supported languages
Repository providing settings operations
ViewModel managing settings state