ThemeStore

object ThemeStore

Durable store for the chosen appearance theme — a single id in the wallet's existing SharedPreferences file (no new dependency, survives process death). The UI keeps an in-memory mirror for instant recomposition; this is the source of truth read on first launch.

Functions

Link copied to clipboard
fun lightMode(context: Context): Boolean

The persisted light-mode flag (default dark = false). Mirrors selectedThemeId so the light/dark choice survives a swipe-away kill too — rememberSaveable alone only carries it across a rotation / OS-killed-with-saved-state, not a cold start.

Link copied to clipboard

The persisted theme id, or null if the user never picked one (→ WalletThemes.Default).

Link copied to clipboard
fun setLightMode(context: Context, on: Boolean)
Link copied to clipboard
fun setSelectedThemeId(context: Context, id: String)