I’ve observed one more issue which I didn’t discuss broadly here. When we change the Text of TextFieldValue from any external effect, say a button click sets some text value for TextField, this doesn’t change the cursor position. Ideally the cursor should be set to end of the set Text. Is there any way I can handle this programmatically? I’m aware of
OffsetMapping
for
VisualTransformation
but this isn’t available for the use-case I mentioned.
s
Siyamed
01/27/2021, 4:25 PM
Set selection to where you want it to be
k
Kshitij Patil
01/27/2021, 4:27 PM
But that will select the text, I don’t want to select but just to move the cursor, are you suggesting my range should be n-1 to n ?