copyWith method

PainterSettings copyWith({
  1. FreeStyleSettings? freeStyle,
  2. ObjectSettings? object,
  3. TextSettings? text,
  4. ShapeSettings? shape,
  5. ScaleSettings? scale,
})

Creates a copy of this but with the given fields replaced with the new values.

Implementation

PainterSettings copyWith({
  FreeStyleSettings? freeStyle,
  ObjectSettings? object,
  TextSettings? text,
  ShapeSettings? shape,
  ScaleSettings? scale,
}) {
  return PainterSettings(
    text: text ?? this.text,
    object: object ?? this.object,
    freeStyle: freeStyle ?? this.freeStyle,
    shape: shape ?? this.shape,
    scale: scale ?? this.scale,
  );
}