ConnectionPathCalculator class
Utility class for creating connection paths from style definitions.
This calculator serves as a facade for the polymorphic ConnectionStyle system, providing a simple static method to create paths while handling backward compatibility and style resolution.
Design Pattern
This class uses the Strategy pattern, delegating path creation to the appropriate ConnectionStyle implementation based on the provided style parameter.
Usage Example
final path = ConnectionPathCalculator.createConnectionPath(
style: ConnectionStyles.smoothstep,
start: Offset(10, 20),
end: Offset(100, 80),
curvature: 0.5,
sourcePort: outputPort,
targetPort: inputPort,
);
See also:
- ConnectionStyle for the base style interface
- ConnectionStyles for built-in style constants
- PathParameters for path creation parameters
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited