selectable static method
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,
Creates a selectable RoundedBackgroundText
See also:
- SelectableText, a run of selectable text with a single style.
- RoundedBackgroundTextField, the editable version of this widget.
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,
);
}