-
-
Save mukeshsolanki/bea2da87facacb1280beaf4ccec5fc99 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
// Collect the darkModeFlow and convert it to a State | |
val darkModeState by darkModeFlow.collectAsState(initial = false) | |
// Display the currently selected theme in your Composable | |
Text(text = "is the app in dark mode: ${darkModeState.value}") | |
// Update teh darkMode value | |
storeDarkMode(true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment