Reputation: 153
We have a text editing functionality in which we load HTML page in an Flutter Web-view. The long press on text opens text selection handles,However i want to change the selection handle turquoise color(that two bubbles before and after text selection). I have tried changing color in android styles but it didn't worked. please note i want to change this in web view.
Upvotes: 0
Views: 1763
Reputation: 443
try this
MaterialApp(
title: 'title',
theme: ThemeData(
textSelectionTheme: TextSelectionThemeData(
selectionColor: primaryColor.withOpacity(.5),
cursorColor: primaryColor.withOpacity(.6),
selectionHandleColor: primaryColor.withOpacity(1),
),
),
home: Home(),
)
Upvotes: 0
Reputation: 153
Just if anyone is looking for answer, I have found it.
Just add this line in app theme inside styles.xml
<item name="android:colorControlActivated">#YourColorString</item>
and it will show expected color
Upvotes: 0