How to change the icon cursor of Textfield in Flutter?

(This image is screen shoot on Android)
I want to change the icon or change colour of the cursor.
textSelectionHandleColor is deprecated and shouldn't be used.
Use TextSelectionThemeData.selectionHandleColor instead.
Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          ...
          textSelectionTheme: TextSelectionThemeData(selectionHandleColor: Colors.black),
          ...
    );
}
You mean the handler selector, not the cursor, right?
Yo can apply that change using textSelectionHandleColor in the root of your app using ThemeData.
I don't think it is possible for individual TextField
Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          textSelectionColor: Colors.yellow,
          textSelectionHandleColor: Colors.red)
    );
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With