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:
- PortShape for available shapes
- ConnectionTheme for configuring default endpoints
- Connection for applying endpoints to connections
- 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
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.