ExtendedText.rich constructor

const ExtendedText.rich(
  1. InlineSpan textSpan, {
  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. SpecialTextGestureTapCallback? onSpecialTextTap,
  16. bool selectionEnabled = false,
  17. GestureTapCallback? onTap,
  18. Color? selectionColor,
  19. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  20. TextSelectionControls? selectionControls,
  21. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  22. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  23. TextOverflowWidget? overflowWidget,
  24. bool joinZeroWidthSpace = false,
  25. ShouldShowSelectionHandlesCallback? shouldShowSelectionHandles,
  26. TextSelectionGestureDetectorBuilderCallback? textSelectionGestureDetectorBuilder,
})

Creates a text widget with a InlineSpan.

Implementation

const ExtendedText.rich(
  InlineSpan this.textSpan, {
  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.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,
})  : data = null,
      specialTextSpanBuilder = 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);