-
-
Save egorikftp/e9781ecfb0643bd2a102e68d7789416a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//initialization with extension | |
private val dataStore: DataStore<Preferences> = context.dataStore | |
val selectedThemeFlow = dataStore.data | |
.map { it[stringPreferencesKey(name = "pref_dark_mode")] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment