copyWith method

TextStyle copyWith({
  1. LogicalPixel? fontSize,
  2. Color? color,
  3. LogicalPixel? strokeWidth,
  4. Color? strokeColor,
  5. TextPlacement? textPlacement,
  6. LogicalPixel? textOffset,
  7. Optional<String?>? fontName,
})

Implementation

TextStyle copyWith({
  LogicalPixel? fontSize,
  Color? color,
  LogicalPixel? strokeWidth,
  Color? strokeColor,
  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,
    textPlacement: textPlacement ?? this.textPlacement,
    textOffset: textOffset ?? this.textOffset,
    fontName: fontName != null ? fontName.value : this.fontName
  );
}