textSelectionThemeData static method

TextSelectionThemeData textSelectionThemeData(
  1. Palette colors
)

Implementation

static TextSelectionThemeData textSelectionThemeData(Palette colors) {
  return TextSelectionThemeData(
    cursorColor: colors.fill,
    // Can't induce text to use textHoveredText, so instead, use opacity to
    // introduce some effect, but not so much so that contrast between
    // text and the selection color is jarringly low.
    selectionColor: colors.text.withOpacityNeue(0.4),
    selectionHandleColor: colors.fill,
  );
}