copyWith method
TextStyle
copyWith({
- LogicalPixel? fontSize,
- Color? color,
- LogicalPixel? strokeWidth,
- Color? strokeColor,
- TextHorizontalAlignment? textHorizontalAlignment,
- TextPlacement? textPlacement,
- LogicalPixel? textOffset,
- Optional<
String?> ? fontName,
Implementation
TextStyle copyWith({
LogicalPixel? fontSize,
Color? color,
LogicalPixel? strokeWidth,
Color? strokeColor,
TextHorizontalAlignment? textHorizontalAlignment,
TextPlacement? textPlacement,
LogicalPixel? textOffset,
Optional<String?>? fontName
}) {
return TextStyle(
fontSize: fontSize ?? this.fontSize,
color: color ?? this.color,
strokeWidth: strokeWidth ?? this.strokeWidth,
strokeColor: strokeColor ?? this.strokeColor,
textHorizontalAlignment: textHorizontalAlignment ?? this.textHorizontalAlignment,
textPlacement: textPlacement ?? this.textPlacement,
textOffset: textOffset ?? this.textOffset,
fontName: fontName != null ? fontName.value : this.fontName
);
}