VSNodeDataProvider class

Inheritance

Constructors

VSNodeDataProvider({required VSNodeManager nodeManager, VSHistoryManger? historyManager})
Wraps VSNodeManager to allow UI interaction and updates

Properties

contextMenuContext → ContextMenuContext?
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
historyManager → VSHistoryManger?
Instance of VSHistoryManger
final
nodeBuildersMap → Map<String, dynamic>
A map of all nodeBuilders can be used to build a context menu.
no setter
nodeManager → VSNodeManager
Instance of VSNodeManager representing the current nodes
final
nodes → Map<String, VSNodeData>
Node data map in this format: {NodeData.id: NodeData}
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedNodes ↔ Set<String>
Set of currently selected node ids
getter/setter pair
viewportOffset ↔ Offset
Used to offset the UI by a given value
getter/setter pair
viewportScale ↔ double
Used to offset the UI by a given value
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addSelectedNodes(Iterable<String> data) → void
Adds an Iterable of type String to the currently selected nodes
applyViewPortTransfrom(Offset inital) → Offset
Helper function to apply viewportOffset and viewportScale to a Offset
clearNodes() → void
Cleares all nodes
closeContextMenu() → void
Closes the context menu
createNodeFromContext(VSNodeDataBuilder builder) → void
Creates a node based on the builder and the current _contextMenuContext
dispose() → void
Discards any resources used by the object.
inherited
findNodesInsideSelectionArea(Offset start, Offset end) → Set<VSNodeData>
Returns a set of all nodes that fall into the are between the supplied start and end
loadSerializedNodes(String serializedNodes) → void
Loades nodes from string and replaces current nodes
moveNode(VSNodeData nodeData, Offset offset) → void
Used to move one or mulitple nodes
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
openContextMenu({required Offset position, VSOutputData? outputData}) → void
Opens the context menu at a given postion
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeNodes(List<VSNodeData> nodeDatas) → void
Removes multiple nodes
removeSelectedNodes(Iterable<String> data) → void
Removes an Iterable of type String from the currently selected nodes
toString() → String
A string representation of this object.
inherited
updateOrCreateNodes(List<VSNodeData> nodeDatas, {bool updateHistory = true}) → void
Updates existing nodes or creates them

Operators

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

Static Methods

of(BuildContext context) → VSNodeDataProvider
Gets the closest VSNodeDataProvider from the widget tree