cursor starting from middle when initial value is there in textfield flutter code example
Example 1: flutter texteditingcontroller cursor position
controller.text = someString;
controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));
Example 2: flutter textfield cursor position
controller.text = someString;
controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));