ConnectionStyle class abstract
Abstract base class for connection styles
Each connection style encapsulates its own:
- Path creation logic
- Hit testing capabilities
- Bend detection parameters
- Optimization strategies
- Implementers
- Available extensions
Constructors
- ConnectionStyle()
-
const
Properties
- bendThreshold → double
-
Get bend detection threshold angle in radians
Used for detecting significant direction changes in the path
no setter
- defaultHitTolerance → double
-
Default hit tolerance for this connection style
Some styles may need different tolerances based on their geometry
no setter
- displayName → String
-
Human-readable display name
no setter
- hasExactBendPoints → bool
-
Whether this connection style has predictable bend points that can be calculated exactly
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Unique identifier for this connection style
no setter
- isBuiltIn → bool
-
Available on ConnectionStyle, provided by the ConnectionStyleExtension extension
Check if this is a built-in connection styleno setter - minBendDistance → double
-
Get minimum distance between bend points as multiplier of tolerance
no setter
- needsBendDetection → bool
-
Whether this connection style needs bend detection for hit testing optimization
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createHitTestPath(
Path originalPath, double tolerance) → Path - Creates an expanded path for hit testing The base implementation provides a simple stroke-based expansion
-
createPath(
PathParameters params) → Path - Creates the geometric path for drawing this connection This is the main responsibility of each connection style
-
getExactBendPoints(
PathParameters params) → List< Offset> ? - Get exact bend points for styles that support it (e.g., step connections) Returns null if the style doesn't support exact bend point calculation
-
getSampleCount(
double pathLength) → int - Get number of samples to use for bend detection based on path length
-
isEquivalentTo(
ConnectionStyle other) → bool - Check if two connection styles are equivalent This is used for caching decisions and theme comparisons
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromEnum(
dynamic enumValue) → ConnectionStyle - Convert from legacy enum values to connection style instances