TextField(
controller: tecTitle,
onChanged: (String title) {
this.title = title;
offset: this.title.length;
},
maxLines: 1,
style: TextStyle(
fontSize: 32, fontWeight: FontWeight.w600),
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Title',
),
),
var tecTitle = TextEditingController(
text: title,
);
since I clicked the textfield to edit it, the cursor goes to the start. how can I fix it? Ive tried set the selection in TextEditingController, but selection isnt defined in it.
question from:https://stackoverflow.com/questions/65866692/why-does-input-cursor-go-to-the-start-in-textfield-flutter