Created
December 4, 2021 09:49
-
-
Save takahirom/4222415fb101578a292d1109e21c4730 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
@Composable | |
fun SettingScreen( | |
settingViewModel: SettingViewModel = viewModel() | |
) { | |
val isDarkMode by settingViewModel.isDarkMode.collectAsState() | |
MySwitch(checked = isDarkMode, onCheckChanged = { | |
settingViewModel.onDarkModeChange(it) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment