BasicTextField¶
BasicTextField can be used to insert text. See TextField for a material version.
@Composable
fun BasicTextFieldDemo() {
var textState by remember { mutableStateOf(TextFieldValue("Hello World")) }
Column {
BasicTextField(value = textState, onValueChange = {
textState = it
})
Text("The textfield has this text: " + textState.text)
}
}
See also:¶
Last update: September 7, 2024