ConnectionEndPoint class

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

A ConnectionEndPoint specifies the shape and size 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
const myEndpoint = ConnectionEndPoint(
  shape: PortShape.triangle,
  size: 8.0,
);

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

See also:

Annotations
  • @JsonSerializable.new()

Constructors

ConnectionEndPoint({required PortShape shape, required double size})
Creates a connection endpoint marker.
const
ConnectionEndPoint.fromJson(Map<String, dynamic> json)
Creates a ConnectionEndPoint from a JSON map.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape PortShape
The geometric shape of the endpoint marker.
final
size double
The size of the marker in logical pixels.
final

Methods

copyWith({PortShape? shape, double? size}) 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).
square → const ConnectionEndPoint
Square endpoint marker with default size 5.0.
triangle → const ConnectionEndPoint
Triangular endpoint marker with default size 5.0.