ExtendedText.rich constructor
const
ExtendedText.rich(
- InlineSpan textSpan, {
- Key? key,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- SpecialTextGestureTapCallback? onSpecialTextTap,
- bool selectionEnabled = false,
- GestureTapCallback? onTap,
- Color? selectionColor,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- TextSelectionControls? selectionControls,
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- TextOverflowWidget? overflowWidget,
- bool joinZeroWidthSpace = false,
- ShouldShowSelectionHandlesCallback? shouldShowSelectionHandles,
- 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);