ThemePreferencesDataSource

Persisted appearance preferences: theme mode, AMOLED, and palette selection.

Inheritors

Properties

Link copied to clipboard
abstract val amoledMode: Flow<Boolean>
Link copied to clipboard
abstract val dynamicColors: Flow<Boolean>
Link copied to clipboard
abstract val dynamicPaletteVariant: Flow<Int>

Emits the selected dynamic palette variant, clamped to a supported index.

Link copied to clipboard
abstract val staticPaletteId: Flow<String>

Emits the selected static palette id, sanitized to a known palette.

Link copied to clipboard

Emits every stored value at once, each as its own flow above reports it.

Link copied to clipboard
abstract val themeMode: Flow<String>

Emits the stored theme mode, defaulting to "follow system".

Functions

Link copied to clipboard
abstract suspend fun saveAmoledMode(isChecked: Boolean)
Link copied to clipboard
abstract suspend fun saveDynamicColors(isChecked: Boolean)
Link copied to clipboard
abstract suspend fun saveDynamicPaletteVariant(variant: Int)

Persists the dynamic palette variant, clamped to a supported index.

Link copied to clipboard
open suspend fun savePalette(dynamicColors: Boolean, dynamicPaletteVariant: Int? = null, staticPaletteId: String? = null)

Persists a palette choice: whether dynamic colors are on, plus the palette that goes with it. A null value is left unchanged.

Link copied to clipboard
abstract suspend fun saveStaticPaletteId(id: String)

Persists the static palette id, sanitized to a known palette.

Link copied to clipboard
abstract suspend fun saveThemeMode(mode: String)