StyledTextAdvance.selectable constructor

const StyledTextAdvance.selectable({
  1. Key? key,
  2. required String text,
  3. bool newLineAsBreaks = false,
  4. TextStyle? style,
  5. Map<String, StyledTextAdvanceTagBase>? tags,
  6. TextAlign? textAlign,
  7. TextDirection? textDirection,
  8. double? textScaleFactor,
  9. int? maxLines,
  10. StrutStyle? strutStyle,
  11. TextWidthBasis? textWidthBasis,
  12. TextHeightBehavior? textHeightBehavior,
  13. FocusNode? focusNode,
  14. bool showCursor = false,
  15. bool autofocus = false,
  16. @Deprecated('Use `contextMenuBuilder` instead. ' 'This feature was deprecated after Flutter v3.3.0-0.5.pre.') ToolbarOptions? toolbarOptions,
  17. EditableTextContextMenuBuilder contextMenuBuilder = _defaultContextMenuBuilder,
  18. TextSelectionControls? selectionControls,
  19. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  20. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  21. SelectionChangedCallback? onSelectionChanged,
  22. TextMagnifierConfiguration? magnifierConfiguration,
  23. double cursorWidth = 2.0,
  24. double? cursorHeight,
  25. Radius? cursorRadius,
  26. Color? cursorColor,
  27. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  28. bool enableInteractiveSelection = true,
  29. GestureTapCallback? onTap,
  30. ScrollPhysics? scrollPhysics,
  31. 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);