copyWith method

  1. @override
TextSpec copyWith({
  1. bool? softWrap,
  2. TextOverflow? overflow,
  3. StrutStyle? strutStyle,
  4. TextAlign? textAlign,
  5. double? textScaleFactor,
  6. int? maxLines,
  7. TextStyle? style,
  8. TextWidthBasis? textWidthBasis,
  9. TextHeightBehavior? textHeightBehavior,
  10. TextDirection? textDirection,
  11. TextDirective? directive,
  12. AnimatedData? animated,
})
override

Creates a copy of this spec with the given fields replaced by the non-null parameter values.

Implementation

@override
TextSpec copyWith({
  bool? softWrap,
  TextOverflow? overflow,
  StrutStyle? strutStyle,
  TextAlign? textAlign,
  double? textScaleFactor,
  int? maxLines,
  TextStyle? style,
  TextWidthBasis? textWidthBasis,
  TextHeightBehavior? textHeightBehavior,
  TextDirection? textDirection,
  TextDirective? directive,
  AnimatedData? animated,
}) {
  return TextSpec(
    overflow: overflow ?? this.overflow,
    strutStyle: strutStyle ?? this.strutStyle,
    textAlign: textAlign ?? this.textAlign,
    textScaleFactor: textScaleFactor ?? this.textScaleFactor,
    maxLines: maxLines ?? this.maxLines,
    style: style ?? this.style,
    textWidthBasis: textWidthBasis ?? this.textWidthBasis,
    textHeightBehavior: textHeightBehavior ?? this.textHeightBehavior,
    textDirection: textDirection ?? this.textDirection,
    softWrap: softWrap ?? this.softWrap,
    directive: directive ?? this.directive,
    animated: animated ?? this.animated,
  );
}