onRichText method
Text
onRichText({
- TextSpan? textSpan,
- TextStyle? style,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
Implementation
Text onRichText({
TextSpan? textSpan,
TextStyle? style,
TextAlign? textAlign,
TextDirection? textDirection,
Locale? locale,
bool? softWrap,
TextOverflow? overflow,
double? textScaleFactor,
int? maxLines,
String? semanticsLabel,
TextWidthBasis? textWidthBasis,
ui.TextHeightBehavior? textHeightBehavior,
}) {
this.style = style ?? this.style;
this.textAlign = textAlign ?? this.textAlign;
this.textDirection = textDirection ?? this.textDirection;
this.locale = locale ?? this.locale;
this.softWrap = softWrap ?? this.softWrap;
this.overflow = overflow ?? this.overflow;
this.textScaleFactor = textScaleFactor ?? this.textScaleFactor;
this.maxLines = maxLines ?? this.maxLines;
this.semanticsLabel = semanticsLabel ?? this.semanticsLabel;
this.textWidthBasis = textWidthBasis ?? this.textWidthBasis;
this.textHeightBehavior = textHeightBehavior ?? this.textHeightBehavior;
Text newWidget;
// text getter
if (textSpan == null) {
newWidget = text;
} else {
this.textSpan = textSpan;
// richText getter
newWidget = richText;
}
return newWidget;
}