-
-
Save burnoo/0d399c29d1ecfb8c35e82ac116af0aa5 to your computer and use it in GitHub Desktop.
Two-way data binding in Jetpack Compose 1
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
class ViewModel { | |
private val _password = MutableStateFlow<String>("") | |
val password: StateFlow<String> = _password | |
fun onPasswordChanged(password: String) { | |
_password.value = password | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment