https://kotlinlang.org logo
#compose
Title
# compose
s

Shakil Karim

01/16/2021, 8:28 PM
Copy code
I'm using OutlinedTextField as follows but not sure why it crashes the app

@Composable
fun OutlinedTextFields() {
    val text = remember { mutableStateOf(TextFieldValue("Text")) }
    OutlinedTextField(
        modifier = Modifier.fillMaxWidth(),
        value = text.value,
        onValueChange = { text.value = it },
        label = { Text("Label") }
    )
}
s

Siyamed

01/16/2021, 9:27 PM
What is the error?
s

Shakil Karim

01/17/2021, 8:23 AM
Sorry, it's working fine. I was not using it correctly.
2 Views