copyWith method

TextEntity copyWith({
  1. String? text,
  2. TextEntityStyle? style,
  3. TextAlign? align,
  4. Color? colour,
  5. double? fontSize,
  6. Offset? position,
  7. double? rotation,
  8. double? scale,
  9. double? width,
})

This overlay, same id, with the given fields replaced.

Implementation

TextEntity copyWith({
  String? text,
  TextEntityStyle? style,
  TextAlign? align,
  Color? colour,
  double? fontSize,
  Offset? position,
  double? rotation,
  double? scale,
  double? width,
}) => TextEntity(
  id: id,
  text: text ?? this.text,
  style: style ?? this.style,
  align: align ?? this.align,
  colour: colour ?? this.colour,
  fontSize: fontSize ?? this.fontSize,
  position: position ?? this.position,
  rotation: rotation ?? this.rotation,
  scale: scale ?? this.scale,
  width: width ?? this.width,
);