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.
Asked
Active
Viewed 1,157 times
0
-
@Dude webview_flutter: ^1.0.7 – flashberry Jan 15 '21 at 09:31
2 Answers
0
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

flashberry
- 153
- 11
0
try this
MaterialApp(
title: 'title',
theme: ThemeData(
textSelectionTheme: TextSelectionThemeData(
selectionColor: primaryColor.withOpacity(.5),
cursorColor: primaryColor.withOpacity(.6),
selectionHandleColor: primaryColor.withOpacity(1),
),
),
home: Home(),
)

Shafi Muhammed
- 433
- 6
- 12