StepConnectionStyle class
Step connection style (90-degree turns with optional rounded corners)
Creates connections with 90-degree turns that follow a predictable step pattern based on port positions. The corner radius can be configured to create either sharp corners (0) or smoothly rounded corners (> 0).
Uses WaypointBuilder for all routing scenarios including:
- Forward connections
- Loopback routing (target behind source)
- Self-connections (same node)
- Same-side ports (e.g., right→right)
Segment-Based Architecture
This style implements createSegments as the primary method. All path rendering, hit testing, and bend detection derive from the segments calculated once - eliminating redundant calculations.
- Inheritance
-
- Object
- ConnectionStyle
- StepConnectionStyle
- Available extensions
Constructors
- StepConnectionStyle({double cornerRadius = 0})
-
Creates a step connection style.
const
Properties
- cornerRadius → double
-
The radius used for rounding corners.
final
- defaultHitTolerance → double
-
Default hit tolerance for this connection style.
Some styles may need different tolerances based on their geometry.
no setterinherited
- displayName → String
-
Human-readable display name
no setteroverride
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique identifier for this connection style
no setteroverride
- isBuiltIn → bool
-
Available on ConnectionStyle, provided by the ConnectionStyleExtension extension
Check if this is a built-in connection styleno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildHitTestPath(
List< Rect> rects) → Path -
Builds a hit test path from rectangle bounds.
inherited
-
buildHitTestRects(
Offset start, List< PathSegment> segments, double tolerance) → List<Rect> -
Builds hit test rectangles from segments.
inherited
-
buildPath(
Offset start, List< PathSegment> segments) → Path -
Builds a Path from segments.
inherited
-
createSegments(
ConnectionPathParameters params) → ({List< PathSegment> segments, Offset start}) -
Creates the path segments for this connection.
override
-
extractBendPoints(
Offset start, List< PathSegment> segments) → List<Offset> -
Extracts bend points from segments.
inherited
-
isEquivalentTo(
ConnectionStyle other) → bool -
Check if two connection styles are equivalent.
This is used for caching decisions and theme comparisons.
inherited
-
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.
override