copyWith method
T
copyWith({
- String? data,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
Implementation
T copyWith({
String? data,
TextStyle? style,
StrutStyle? strutStyle,
TextAlign? textAlign,
TextDirection? textDirection,
Locale? locale,
bool? softWrap,
TextOverflow? overflow,
double? textScaleFactor,
int? maxLines,
String? semanticsLabel,
TextWidthBasis? textWidthBasis,
}) =>
(this is _StyledAnimatedTextContainer
? _StyledAnimatedTextContainer(
data ?? this.data ?? "",
style: style ?? this.style,
strutStyle: strutStyle ?? this.strutStyle,
textAlign: textAlign ?? this.textAlign,
locale: locale ?? this.locale,
maxLines: maxLines ?? this.maxLines,
overflow: overflow ?? this.overflow,
semanticsLabel: semanticsLabel ?? this.semanticsLabel,
softWrap: softWrap ?? this.softWrap,
textDirection: textDirection ?? this.textDirection,
textScaleFactor: textScaleFactor ?? this.textScaleFactor,
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
)
: Text(
data ?? this.data ?? "",
style: style ?? this.style,
strutStyle: strutStyle ?? this.strutStyle,
textAlign: textAlign ?? this.textAlign,
locale: locale ?? this.locale,
maxLines: maxLines ?? this.maxLines,
overflow: overflow ?? this.overflow,
semanticsLabel: semanticsLabel ?? this.semanticsLabel,
softWrap: softWrap ?? this.softWrap,
textDirection: textDirection ?? this.textDirection,
textScaleFactor: textScaleFactor ?? this.textScaleFactor,
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
)) as T;