TextField(
value = TextFieldValue(
text = textValue,
selection = TextRange(textValue.length)
),
onValueChange = {
textValue = it.text
}
)
TextField(
value = TextFieldValue(
text = textValue,
selection = TextRange(textValue.length). // TextRange(0, textValue.length) -> Select that text in a color
),
onValueChange = {
textValue = it.text
}
)
var textFieldValueState by remember {
mutableStateOf(TextFieldValue(text = textValue, selection = TextRange(textValue.length)))
}
TextField(
value = textFieldValueState,
onValueChange = { textFieldValueState = it }
)