flutter text field set default value set cursor to end of string code example
Example: flutter texteditingcontroller cursor position
controller.text = someString;
controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));