flashberry
flashberry

Reputation: 153

Flutter webview text selection handle color

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.

enter image description here

Upvotes: 0

Views: 1763

Answers (2)

Shafi Muhammed
Shafi Muhammed

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

flashberry
flashberry

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

Related Questions