selectableRich static method

Widget selectableRich(
  1. TextSpan textSpan, {
  2. Key? key,
  3. FocusNode? focusNode,
  4. bool autofocus = false,
  5. TextSelectionControls? selectionControls,
  6. TextDirection? textDirection,
  7. Color? backgroundColor,
  8. TextAlign textAlign = TextAlign.start,
  9. TextWidthBasis? textWidthBasis,
  10. TextScaler textScaler = TextScaler.noScaling,
  11. double innerRadius = kDefaultInnerRadius,
  12. double outerRadius = kDefaultOuterRadius,
  13. double cursorWidth = 2.0,
  14. Color? cursorColor,
  15. double? cursorHeight,
  16. Radius? cursorRadius,
  17. SelectionChangedCallback? onSelectionChanged,
  18. bool enableInteractiveSelection = true,
  19. String? semanticsLabel,
  20. TextMagnifierConfiguration? magnifierConfiguration,
})

Creates a selectable RoundedBackgroundText that can have multiple styles

See also:

Implementation

static Widget selectableRich(
  TextSpan textSpan, {
  Key? key,
  FocusNode? focusNode,
  bool autofocus = false,
  TextSelectionControls? selectionControls,
  TextDirection? textDirection,
  Color? backgroundColor,
  TextAlign textAlign = TextAlign.start,
  TextWidthBasis? textWidthBasis,
  TextScaler textScaler = TextScaler.noScaling,
  double innerRadius = kDefaultInnerRadius,
  double outerRadius = kDefaultOuterRadius,
  double cursorWidth = 2.0,
  Color? cursorColor,
  double? cursorHeight,
  Radius? cursorRadius,
  SelectionChangedCallback? onSelectionChanged,
  bool enableInteractiveSelection = true,
  String? semanticsLabel,
  TextMagnifierConfiguration? magnifierConfiguration,
}) {
  return Stack(children: [
    RoundedBackgroundText.rich(
      text: textSpan,
      textDirection: textDirection,
      textAlign: textAlign,
      textScaler: textScaler,
      innerRadius: innerRadius,
      outerRadius: outerRadius,
      backgroundColor: backgroundColor,
      textWidthBasis: textWidthBasis,
    ),
    SelectableText.rich(
      textSpan,
      textDirection: textDirection,
      textAlign: textAlign,
      textScaler: textScaler,
      cursorColor: cursorColor,
      cursorHeight: cursorHeight,
      cursorRadius: cursorRadius,
      cursorWidth: cursorWidth,
      selectionControls: selectionControls,
      onSelectionChanged: onSelectionChanged,
      enableInteractiveSelection: enableInteractiveSelection,
      focusNode: focusNode,
      autofocus: autofocus,
      semanticsLabel: semanticsLabel,
      magnifierConfiguration: magnifierConfiguration,
      textWidthBasis: textWidthBasis,
    ),
  ]);
}