SettingsRepository

Repository for managing user settings.

This repository uses DataStore for local persistence of user preferences like theme configuration and dynamic color preferences. All settings are stored locally only.

See also

Implementation class with DataStore integration

Functions

Link copied to clipboard
abstract fun getSettings(): Flow<Settings>

Retrieves the user settings as a Flow.

Link copied to clipboard
abstract suspend fun setDarkThemeConfig(darkThemeConfig: DarkThemeConfig): Result<Unit>

Sets the dark theme configuration.

Link copied to clipboard
abstract suspend fun setDynamicColorPreference(useDynamicColor: Boolean): Result<Unit>

Sets the dynamic color preference.

Link copied to clipboard
abstract suspend fun signOut(): Result<Unit>

Signs out the current user.