ConnectionPainter class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
nodeShape
↔ NodeShape ? Function(Node node ) ?
Optional function to get the shape for a node.
Used to calculate correct port positions for shaped nodes.
getter/setter pair
pathCache
→ ConnectionPathCache
Gets the connection path cache
Used by label calculator to leverage cached paths
no setter
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
theme
→ NodeFlowTheme
no setter
Methods
clearAllCachedPaths ()
→ void
Clear all cached paths (useful for bulk operations or theme changes)
dispose ()
→ void
Dispose and clear all cached paths
getCacheStats ()
→ Map <String , dynamic >
Get cache statistics for debugging
hasConnectionCached (String connectionId )
→ bool
Check if a connection has a cached path
hitTestConnection ({required Connection connection , required Node sourceNode , required Node targetNode , required Offset testPoint , double ? tolerance })
→ bool
Test if a point is near a connection path using cached paths for performance
Returns true if the point is within the specified tolerance distance from the path
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paintConnection (Canvas canvas , Connection connection , Node sourceNode , Node targetNode , {bool isSelected = false , bool isAnimated = false , double ? animationValue })
→ void
paintTemporaryConnection (Canvas canvas , Offset startPoint , Offset currentPoint , {Port ? sourcePort , Port ? targetPort , bool isReversed = false })
→ void
removeConnectionFromCache (String connectionId )
→ void
Remove cached path when connection is deleted
toString ()
→ String
A string representation of this object.
inherited
updateNodeShape (NodeShape ? getter (Node node )? )
→ void
Update the node shape getter
This allows updating how shapes are determined for nodes after painter creation
updateTheme (NodeFlowTheme newTheme )
→ void
Update the theme
Cache invalidation is handled by the path cache itself