Reputation: 429
I'm using the following theme code:
ThemeData.dark().copyWith(
accentColor: Colors.green,
textSelectionColor: Colors.green.withOpacity(0.5),
textSelectionHandleColor: Colors.green,
);
And that works for android, but for iOS it is not changing the color of the text selection handle color to green (it is still the default blue). How can I change that color for iOS?
Upvotes: 5
Views: 3572
Reputation: 429
I was able to change the color using Themes. You need to set cupertinoOverrideTheme like this
CupertinoThemeData(
primaryColor: Colors.green,
)
Upvotes: 13
Reputation: 5192
it seems that this is a known issue.
It would appear that TextField
on iOS ignores the MaterialTheme
values for this.
Another piece of information which suggests that this is not possible in iOS is looking at the CupertinoThemeData documentation, which clearly does not consider a textSelectionHandleColor
.
Upvotes: 1