StyledTextAdvance.selectable constructor
const
StyledTextAdvance.selectable({
- Key? key,
- required String text,
- bool newLineAsBreaks = false,
- TextStyle? style,
- Map<
String, StyledTextAdvanceTagBase> ? tags, - TextAlign? textAlign,
- TextDirection? textDirection,
- double? textScaleFactor,
- int? maxLines,
- StrutStyle? strutStyle,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- FocusNode? focusNode,
- bool showCursor = false,
- bool autofocus = false,
- @Deprecated('Use `contextMenuBuilder` instead. ' 'This feature was deprecated after Flutter v3.3.0-0.5.pre.') ToolbarOptions? toolbarOptions,
- EditableTextContextMenuBuilder contextMenuBuilder = _defaultContextMenuBuilder,
- TextSelectionControls? selectionControls,
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- SelectionChangedCallback? onSelectionChanged,
- TextMagnifierConfiguration? magnifierConfiguration,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableInteractiveSelection = true,
- GestureTapCallback? onTap,
- ScrollPhysics? scrollPhysics,
- String? semanticsLabel,
Create a selectable text widget with formatting via tags.
See SelectableText.rich for more options.
Implementation
const StyledTextAdvance.selectable({
Key? key,
required this.text,
this.newLineAsBreaks = false,
this.style,
Map<String, StyledTextAdvanceTagBase>? tags,
this.textAlign,
this.textDirection,
this.textScaleFactor,
this.maxLines,
this.strutStyle,
this.textWidthBasis,
this.textHeightBehavior,
FocusNode? focusNode,
bool showCursor = false,
bool autofocus = false,
@Deprecated(
'Use `contextMenuBuilder` instead. '
'This feature was deprecated after Flutter v3.3.0-0.5.pre.',
)
// ignore: deprecated_member_use
ToolbarOptions? toolbarOptions,
EditableTextContextMenuBuilder contextMenuBuilder =
_defaultContextMenuBuilder,
TextSelectionControls? selectionControls,
ui.BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
ui.BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
SelectionChangedCallback? onSelectionChanged,
TextMagnifierConfiguration? magnifierConfiguration,
double cursorWidth = 2.0,
double? cursorHeight,
Radius? cursorRadius,
Color? cursorColor,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
bool enableInteractiveSelection = true,
GestureTapCallback? onTap,
ScrollPhysics? scrollPhysics,
String? semanticsLabel,
}) : tags = tags ?? const {},
selectable = true,
softWrap = true,
overflow = TextOverflow.clip,
locale = null,
_focusNode = focusNode,
_showCursor = showCursor,
_autofocus = autofocus,
_toolbarOptions = toolbarOptions ??
// ignore: deprecated_member_use
const ToolbarOptions(
selectAll: true,
copy: true,
),
_contextMenuBuilder = contextMenuBuilder,
_selectionHeightStyle = selectionHeightStyle,
_selectionWidthStyle = selectionWidthStyle,
_selectionControls = selectionControls,
_onSelectionChanged = onSelectionChanged,
_magnifierConfiguration = magnifierConfiguration,
_cursorWidth = cursorWidth,
_cursorHeight = cursorHeight,
_cursorRadius = cursorRadius,
_cursorColor = cursorColor,
_dragStartBehavior = dragStartBehavior,
_enableInteractiveSelection = enableInteractiveSelection,
_onTap = onTap,
_scrollPhysics = scrollPhysics,
_semanticsLabel = semanticsLabel,
super(key: key);