copyWith method

ConnectionEndPoint copyWith({
  1. MarkerShape? shape,
  2. Size? size,
  3. Color? color,
  4. Color? borderColor,
  5. double? borderWidth,
})

Creates a copy of this endpoint with optionally updated properties.

Parameters:

  • shape: If provided, replaces the current shape
  • size: If provided, replaces the current size
  • color: If provided, replaces the current color
  • borderColor: If provided, replaces the current border color
  • borderWidth: If provided, replaces the current border width

Returns: A new ConnectionEndPoint with the specified changes

Implementation

ConnectionEndPoint copyWith({
  MarkerShape? shape,
  Size? size,
  Color? color,
  Color? borderColor,
  double? borderWidth,
}) {
  return ConnectionEndPoint(
    shape: shape ?? this.shape,
    size: size ?? this.size,
    color: color ?? this.color,
    borderColor: borderColor ?? this.borderColor,
    borderWidth: borderWidth ?? this.borderWidth,
  );
}