copyWith method

PrintColumn copyWith({
  1. String? text,
  2. double? x,
  3. TextAlign? align,
  4. double? fontSize,
  5. FontWeight? fontWeight,
  6. String? fontFamily,
  7. Color? color,
})

Creates a copy of this column with updated properties.

  • text: New text (or null to keep current)
  • x: New x position (or null to keep current)
  • align: New text alignment (or null to keep current)
  • fontSize: New font size (or null to keep current)
  • fontWeight: New font weight (or null to keep current)
  • fontFamily: New font family (or null to keep current)
  • color: New text color (or null to keep current)

Implementation

PrintColumn copyWith({
  String? text,
  double? x,
  TextAlign? align,
  double? fontSize,
  FontWeight? fontWeight,
  String? fontFamily,
  Color? color,
}) {
  return PrintColumn(
    text: text ?? this.text,
    x: x ?? this.x,
    align: align ?? this.align,
    fontSize: fontSize ?? this.fontSize,
    fontWeight: fontWeight ?? this.fontWeight,
    fontFamily: fontFamily ?? this.fontFamily,
    color: color ?? this.color,
  );
}