Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Composable
fun Calculator(state: CalculatorViewModel) {
Column {
TextField(value = state.v1, onValueChange = { state.v1 = it })
TextField(value = state.v2, onValueChange = { state.v2 = 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