copyWith method
Text
copyWith({
- String? data,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- TextScaler? textScaler,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
- TextHeightBehavior? textHeightBehavior,
- Color? selectionColor,
Implementation
Text copyWith({
String? data,
TextStyle? style,
StrutStyle? strutStyle,
TextAlign? textAlign,
TextDirection? textDirection,
Locale? locale,
bool? softWrap,
TextOverflow? overflow,
TextScaler? textScaler,
int? maxLines,
String? semanticsLabel,
TextWidthBasis? textWidthBasis,
TextHeightBehavior? textHeightBehavior,
Color? selectionColor,
}) =>
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,
textScaler: textScaler ?? this.textScaler,
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
textHeightBehavior: textHeightBehavior ?? this.textHeightBehavior,
selectionColor: selectionColor ?? this.selectionColor,
);