NodeEditorController class

This controller handle all information that is used by Node Editor Widget The nodes, its ports and its properties is managed by this class The screen information as canvas size is managed by this class too

Mixed in types

Constructors

NodeEditorController()

Properties

connections List<Connection>
no setter
connectionsManager → ConnectionsManager
Manager the connections between the ports. The connections between the ports of the widget nodes is stored in this manager Using this manager is possible to add, remover or search by connections between the ports of the nodes
final
currentScreenSize Size?
The current size of the stack widget It's available only after the first frame is rendered
getter/setter pair
focusNode FocusNode
Focus node that request a focus when some node is tap or moved this attribute must be initialized in the init of the main widget node editor
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
horizontalScrollController ScrollController
ScrollController is set by the canvas, it is used by others class to control the scroll when the user move the nodes for a area outside the visible canvas
getter/setter pair
isShiftPressed bool
no getter
mousePoint Offset?
no setter
nodes Map<String, NodeModel>
no setter
nodesManager → NodesManager
Manager the nodes. The nodes represent the widgets node properties in the canvas. Every node and its properties is inside this manager Using nodesManager the user is able to insert and remove nodes, and its properties and ports
final
onSelectListener ↔ (void Function(Connection conn)?)
Listener that is used when the user select a connection
getter/setter pair
outNodeName String?
no setter
outPortName String?
no setter
outTheme ConnectionTheme?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackPos Offset?
Store the start position of stack widget in the canvas. This position is used to calculate the position of the connections in the canvas
getter/setter pair
startPointConnection Offset?
no setter
verticalScrollController ScrollController
getter/setter pair

Methods

addConnectionByTap({required String inNode, required String inPort}) → void
addInPort(String nodeName, InPort inPortInfo) → void
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addNode(NodeWidgetBase nodeWidget, NodePosition position) → void
addOutPort(String nodeName, OutPort outPortInfo) → void
addProperty(String nodeName, Property property) → void
addSelectListener(void fn(Connection conn)?) → void
deleteSelectedConnections() → void
deleteSelectedNodes() → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getMaxScreenSize() Size
getPort(String nodeName, String portName) → Port?
isInputPortConnected(String nodeName, String portName) bool
isOutputPortConnected(String nodeName, String portName) bool
mousePosition(Offset pos) → void
moveNodePosition(String name, Offset delta) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → dynamic
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
selectNodeAction(String nodeName) → void
selectOnTap(Offset tapPosition) → void
setConnecting(String nameNode, String namePort) → void
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
unsetConnecting() → void

Operators

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