copyWith method

ShapeLayerModel copyWith({
  1. String? id,
  2. String? type,
  3. double? x,
  4. double? y,
  5. String? shapeType,
  6. double? width,
  7. double? height,
  8. String? fillColor,
  9. String? strokeColor,
  10. double? strokeWidth,
})

Implementation

ShapeLayerModel copyWith({
  String? id,
  String? type,
  double? x,
  double? y,
  String? shapeType,
  double? width,
  double? height,
  String? fillColor,
  String? strokeColor,
  double? strokeWidth,
}) {
  return ShapeLayerModel(
    id: id ?? this.id,
    type: type ?? this.type,
    x: x ?? this.x,
    y: y ?? this.y,
    shapeType: shapeType ?? this.shapeType,
    width: width ?? this.width,
    height: height ?? this.height,
    fillColor: fillColor ?? this.fillColor,
    strokeColor: strokeColor ?? this.strokeColor,
    strokeWidth: strokeWidth ?? this.strokeWidth,
  );
}