flutter textfield cursor code example
Example 1: flutter textfield cursor color
MaterialApp(
theme: ThemeData(
cursorColor: Colors.red,
)
);
Example 2: flutter textfield cursor position
controller.text = someString;
controller.selection = TextSelection.fromPosition(TextPosition(offset: controller.text.length));