SelectableText constructor
const
SelectableText(
- String data, {
- Key? key,
- FocusNode? focusNode,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- TextScaler? textScaler,
- bool showCursor = false,
- bool autofocus = false,
- int? minLines,
- int? maxLines,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableInteractiveSelection = true,
- TextSelectionControls? selectionControls,
- GestureTapCallback? onTap,
- ScrollPhysics? scrollPhysics,
- String? semanticsLabel,
- TextHeightBehavior? textHeightBehavior,
- TextWidthBasis? textWidthBasis,
- SelectionChangedCallback? onSelectionChanged,
- bool useNativeContextMenu = false,
- EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
- TextMagnifierConfiguration? magnifierConfiguration,
Implementation
const SelectableText(
String this.data, {
super.key,
this.focusNode,
this.style,
this.strutStyle,
this.textAlign,
this.textDirection,
this.textScaler,
this.showCursor = false,
this.autofocus = false,
this.minLines,
this.maxLines,
this.cursorWidth = 2.0,
this.cursorHeight,
this.cursorRadius,
this.cursorColor,
this.selectionHeightStyle = ui.BoxHeightStyle.tight,
this.selectionWidthStyle = ui.BoxWidthStyle.tight,
this.dragStartBehavior = DragStartBehavior.start,
this.enableInteractiveSelection = true,
this.selectionControls,
this.onTap,
this.scrollPhysics,
this.semanticsLabel,
this.textHeightBehavior,
this.textWidthBasis,
this.onSelectionChanged,
this.useNativeContextMenu = false,
this.contextMenuBuilder = _defaultContextMenuBuilder,
this.magnifierConfiguration,
}) : assert(maxLines == null || maxLines > 0),
assert(minLines == null || minLines > 0),
assert(
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
"minLines can't be greater than maxLines",
),
textSpan = null;