copyWith method

TextLayerModel copyWith({
  1. String? id,
  2. String? type,
  3. double? x,
  4. double? y,
  5. double? fontSize,
  6. String? color,
  7. String? font,
  8. String? defaultText,
  9. String? label,
})

Implementation

TextLayerModel copyWith({
  String? id,
  String? type,
  double? x,
  double? y,
  double? fontSize,
  String? color,
  String? font,
  String? defaultText,
  String? label,
}) {
  return TextLayerModel(
    id: id ?? this.id,
    type: type ?? this.type,
    x: x ?? this.x,
    y: y ?? this.y,
    fontSize: fontSize ?? this.fontSize,
    color: color ?? this.color,
    font: font ?? this.font,
    defaultText: defaultText ?? this.defaultText,
    label: label ?? this.label,
  );
}