selectable static method

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

Creates a selectable RoundedBackgroundText

See also:

Implementation

static Widget selectable(
  String text, {
  Key? key,
  FocusNode? focusNode,
  bool autofocus = false,
  TextSelectionControls? selectionControls,
  TextStyle? style,
  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 selectableRich(
    TextSpan(text: text, style: style),
    autofocus: autofocus,
    backgroundColor: backgroundColor,
    cursorColor: cursorColor,
    cursorHeight: cursorHeight,
    cursorRadius: cursorRadius,
    cursorWidth: cursorWidth,
    enableInteractiveSelection: enableInteractiveSelection,
    focusNode: focusNode,
    innerRadius: innerRadius,
    key: key,
    onSelectionChanged: onSelectionChanged,
    outerRadius: outerRadius,
    selectionControls: selectionControls,
    semanticsLabel: semanticsLabel,
    textAlign: textAlign,
    textDirection: textDirection,
    textScaler: textScaler,
    textWidthBasis: textWidthBasis,
    magnifierConfiguration: magnifierConfiguration,
  );
}