Created
September 19, 2021 17:12
-
-
Save fabioCollini/49462cb895802b2c3f7e98764e072aa2 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 Calculator(state: CalculatorViewModel) { | |
Column { | |
TextField(value = state.v1.collectAsState().value, onValueChange = { state.v1.value = it }) | |
TextField(value = state.v2.collectAsState().value, onValueChange = { state.v2.value = it }) | |
Text(text = state.result.collectAsState().value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment