I want to change cursor color, completely. I have added following code:
TextField(
...
cursorColor: myBlueColor,
)
However, this does not change bottom indicator (when you select part of the text/text position) - it is still purple:
Can somebody help how to achieve this? I am using Flutter 3.16.0.
In your MaterialApp
, you can change the selectionHandleColor
for the TextSelectionThemeData
:
theme: ThemeData(
textSelectionTheme: TextSelectionThemeData(
cursorColor: Colors.red,
selectionColor: Colors.green,
selectionHandleColor: Colors.black,
),
)