copyWith method
Text
copyWith({
- String? data,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- Locale? locale,
- bool? softWrap,
- TextOverflow? overflow,
- double? textScaleFactor,
- int? maxLines,
- String? semanticsLabel,
- TextWidthBasis? textWidthBasis,
Implementation
Text copyWith({
final String? data,
final TextStyle? style,
final StrutStyle? strutStyle,
final TextAlign? textAlign,
final Locale? locale,
final bool? softWrap,
final TextOverflow? overflow,
final double? textScaleFactor,
final int? maxLines,
final String? semanticsLabel,
final TextWidthBasis? 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,
textScaleFactor: textScaleFactor ?? this.textScaleFactor,
textWidthBasis: textWidthBasis ?? this.textWidthBasis,
);