NodesLayer<T> class

Nodes layer widget that renders all nodes with optimized reactivity.

This layer handles rendering of all nodes and wires gesture callbacks from the editor to individual NodeWidget instances.

Inheritance
Available extensions

Constructors

NodesLayer({Key? key, required NodeFlowController<T> controller, required Widget nodeBuilder(BuildContext context, Node<T> node), required List<Connection> connections, Widget nodeContainerBuilder(BuildContext context, Node<T> node, Widget content)?, PortBuilder<T>? portBuilder, void onNodeTap(Node<T> node)?, void onNodeDoubleTap(Node<T> node)?, void onNodeContextMenu(Node<T> node, Offset globalPosition)?, void onNodeMouseEnter(Node<T> node)?, void onNodeMouseLeave(Node<T> node)?, void onPortContextMenu(String nodeId, String portId, bool isOutput, Offset globalPosition)?, double portSnapDistance = 8.0})
const

Properties

connections List<Connection>
final
controller NodeFlowController<T>
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
nodeBuilder Widget Function(BuildContext context, Node<T> node)
final
nodeContainerBuilder Widget Function(BuildContext context, Node<T> node, Widget content)?
Optional builder for customizing the node container. When not provided, uses the default NodeWidget implementation.
final
onNodeContextMenu → void Function(Node<T> node, Offset globalPosition)?
Callback invoked when a node is right-clicked (context menu).
final
onNodeDoubleTap → void Function(Node<T> node)?
Callback invoked when a node is double-tapped.
final
onNodeMouseEnter → void Function(Node<T> node)?
Callback invoked when mouse enters a node.
final
onNodeMouseLeave → void Function(Node<T> node)?
Callback invoked when mouse leaves a node.
final
onNodeTap → void Function(Node<T> node)?
Callback invoked when a node is tapped.
final
onPortContextMenu → void Function(String nodeId, String portId, bool isOutput, Offset globalPosition)?
Callback invoked when a port is right-clicked (context menu).
final
portBuilder PortBuilder<T>?
Optional builder for customizing individual port widgets. When not provided, uses the default PortWidget implementation.
final
portSnapDistance double
Distance around ports that expands the hit area for easier targeting.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited
withAnnotationLayer(NodeFlowController<T> controller) Widget

Available on Widget, provided by the AnnotationLayerSupport extension

Wraps this widget with an annotation layer.

Operators

operator ==(Object other) bool
The equality operator.
inherited