Change highlight colour for textfield in flutter
201
Solution 1. You can change the textSelectionColor
in the theme
of your app:
theme: ThemeData.dark().copyWith(
textSelectionColor: Colors.black
),
Solution 2. You can change the textSelectionColor
only for a specific TextField
by wrapping it with a Theme
widget:
Theme(
data: ThemeData(
textSelectionColor: Colors.black,
),
child: TextField(
),
),