savePalette

open suspend override fun savePalette(dynamicColors: Boolean, dynamicPaletteVariant: Int? = null, staticPaletteId: String? = null)(source)

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

A palette choice always changes dynamicColors together with a palette, and two separate writes would let a process death keep only the first one. DefaultThemePreferencesDataSource writes everything in one transaction; this default writes the values one by one so other implementations keep compiling.