copyWith method

Text copyWith({
  1. String? data,
  2. TextStyle? style,
  3. StrutStyle? strutStyle,
  4. TextAlign? textAlign,
  5. TextDirection? textDirection,
  6. Locale? locale,
  7. bool? softWrap,
  8. TextOverflow? overflow,
  9. double? textScaleFactor,
  10. int? maxLines,
  11. String? semanticsLabel,
  12. TextWidthBasis? textWidthBasis,
})

Implementation

Text 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,
}) =>
    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.linear(textScaleFactor ?? 0),
      textWidthBasis: textWidthBasis ?? this.textWidthBasis,
    );