ExtendedText constructor

const ExtendedText(
  1. String data, {
  2. Key? key,
  3. TextStyle? style,
  4. StrutStyle? strutStyle,
  5. TextAlign? textAlign,
  6. TextDirection? textDirection,
  7. Locale? locale,
  8. bool? softWrap,
  9. TextOverflow? overflow,
  10. double? textScaleFactor,
  11. int? maxLines,
  12. String? semanticsLabel,
  13. TextWidthBasis? textWidthBasis,
  14. TextHeightBehavior? textHeightBehavior,
  15. SpecialTextSpanBuilder? specialTextSpanBuilder,
  16. SpecialTextGestureTapCallback? onSpecialTextTap,
  17. bool selectionEnabled = false,
  18. GestureTapCallback? onTap,
  19. Color? selectionColor,
  20. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  21. TextSelectionControls? selectionControls,
  22. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  23. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  24. TextOverflowWidget? overflowWidget,
  25. bool joinZeroWidthSpace = false,
  26. ShouldShowSelectionHandlesCallback? shouldShowSelectionHandles,
  27. TextSelectionGestureDetectorBuilderCallback? textSelectionGestureDetectorBuilder,
})

Creates a text widget.

If the style argument is null, the text will use the style from the closest enclosing DefaultTextStyle.

Implementation

const ExtendedText(
  String this.data, {
  Key? key,
  this.style,
  this.strutStyle,
  this.textAlign,
  this.textDirection,
  this.locale,
  this.softWrap,
  this.overflow,
  this.textScaleFactor,
  this.maxLines,
  this.semanticsLabel,
  this.textWidthBasis,
  this.textHeightBehavior,
  this.specialTextSpanBuilder,
  this.onSpecialTextTap,
  this.selectionEnabled = false,
  this.onTap,
  this.selectionColor,
  this.dragStartBehavior = DragStartBehavior.start,
  this.selectionControls,
  this.selectionHeightStyle = ui.BoxHeightStyle.tight,
  this.selectionWidthStyle = ui.BoxWidthStyle.tight,
  this.overflowWidget,
  this.joinZeroWidthSpace = false,
  this.shouldShowSelectionHandles,
  this.textSelectionGestureDetectorBuilder,
})  : textSpan = null,
      // assert(!(betterLineBreakingAndOverflowStyle && selectionEnabled),
      //    'join zero width space into text, the word will not be a word, the [TextPainter] won\'t work any more.'),
      super(key: key);