copyWith method
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,
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,
);
}