ConnectionEndPoint class

Defines the visual marker at the start or end of a connection.

A ConnectionEndPoint specifies the shape, size, and colors of decorative markers (like arrows, circles, or diamonds) that appear at connection endpoints. These markers help visually indicate the direction and termination points of connections.

Common Use Cases

  • Arrow heads to show data flow direction
  • Circles or diamonds for aesthetic purposes
  • No marker when a clean line is desired

Usage Example

// Create a custom endpoint with colors
const myEndpoint = ConnectionEndPoint(
  shape: MarkerShapes.triangle,
  size: Size.square(8.0),
  color: Colors.blue,
  borderColor: Colors.blueAccent,
  borderWidth: 1.0,
);

// Use predefined endpoints
const arrowEnd = ConnectionEndPoint.triangle;
const circleEnd = ConnectionEndPoint.circle;
const noEnd = ConnectionEndPoint.none;

See also:

Annotations
  • @JsonSerializable.new()

Constructors

ConnectionEndPoint({required MarkerShape shape, required Size size, Color? color, Color? borderColor, double? borderWidth})
Creates a connection endpoint marker.
const
ConnectionEndPoint.fromJson(Map<String, dynamic> json)
Creates a ConnectionEndPoint from a JSON map.
factory

Properties

borderColor Color?
The border color of the endpoint marker.
final
borderWidth double?
The border width of the endpoint marker.
final
color Color?
The fill color of the endpoint marker.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape MarkerShape
The geometric shape of the endpoint marker.
final
size Size
The size of the marker in logical pixels.
final

Methods

copyWith({MarkerShape? shape, Size? size, Color? color, Color? borderColor, double? borderWidth}) ConnectionEndPoint
Creates a copy of this endpoint with optionally updated properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this endpoint to a JSON map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

capsuleHalf → const ConnectionEndPoint
Half-capsule endpoint marker with default size 5.0.
circle → const ConnectionEndPoint
Circular endpoint marker with default size 5.0.
diamond → const ConnectionEndPoint
Diamond endpoint marker with default size 5.0.
none → const ConnectionEndPoint
No endpoint marker (invisible).
rectangle → const ConnectionEndPoint
Rectangle endpoint marker with default size 5.0.
triangle → const ConnectionEndPoint
Triangular endpoint marker with default size 5.0.