ThemeStore

interface ThemeStore

Persistence seam for the theme choice. The default is in-memory; core:data binds a DataStore-backed implementation in Koin (same interface → no shell/settings changes), which is how the dark-mode choice survives process death.

ponytail: synchronous read/write. The stored value is a single boolean read once at construction and written on toggle — a DataStore actual can runBlocking a first-value read at startup without a perceptible cost. Move to a suspend/Flow seam only if theme grows into a multi-field profile.

Inheritors

Functions

Link copied to clipboard
abstract fun darkOverride(): Boolean?

The persisted dark-mode choice, or null if the user hasn't chosen yet (→ use the default).

Link copied to clipboard
abstract fun setDark(dark: Boolean)

Persist the user's dark-mode choice.