copyWith method

Text copyWith({
  1. String? data,
  2. TextStyle? style,
  3. StrutStyle? strutStyle,
  4. TextAlign? textAlign,
  5. Locale? locale,
  6. bool? softWrap,
  7. TextOverflow? overflow,
  8. double? textScaleFactor,
  9. int? maxLines,
  10. String? semanticsLabel,
  11. 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,
    );