SelectableText constructor

const SelectableText(
  1. String data, {
  2. Key? key,
  3. FocusNode? focusNode,
  4. TextStyle? style,
  5. StrutStyle? strutStyle,
  6. TextAlign? textAlign,
  7. TextDirection? textDirection,
  8. TextScaler? textScaler,
  9. bool showCursor = false,
  10. bool autofocus = false,
  11. int? minLines,
  12. int? maxLines,
  13. double cursorWidth = 2.0,
  14. double? cursorHeight,
  15. Radius? cursorRadius,
  16. Color? cursorColor,
  17. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  18. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  19. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  20. bool enableInteractiveSelection = true,
  21. TextSelectionControls? selectionControls,
  22. GestureTapCallback? onTap,
  23. ScrollPhysics? scrollPhysics,
  24. String? semanticsLabel,
  25. TextHeightBehavior? textHeightBehavior,
  26. TextWidthBasis? textWidthBasis,
  27. SelectionChangedCallback? onSelectionChanged,
  28. bool useNativeContextMenu = false,
  29. EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
  30. 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;