CLNodeGraph class
Canvas a nodi data-driven: render nodi+archi da nodes/edges, tap→select,
drag-porta (dx→sx) per creare prereq, drag-corpo per spostare il nodo
(effimero), hover arco→cestino per eliminare, "Ordina" per risnappare al
layout. Nessun motore imperativo: si ridisegna dalle props.
Gesture: UN solo Listener raw a livello viewport. Su pointer-down un
hit-test manuale (in coord canvas) decide il _Mode; move/up smistano di
conseguenza. Zoom con rotella. Niente InteractiveViewer, niente
GestureDetector annidati → interazione deterministica.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CLNodeGraph
- Available extensions
Constructors
-
CLNodeGraph({Key? key, required List<
CLGraphNode> nodes, required List<CLGraphEdge> edges, String? selectedNodeId, void onNodeTap(String nodeId)?, void onEdgeCreate(String fromNodeId, String toNodeId, CLGraphEdgeKind kind)?, void onEdgeDelete(String edgeId, CLGraphEdgeKind kind)?, Future<bool> onReparent(String childNodeId, String newParentNodeId)?, bool canDrag(CLGraphNode node)?, bool canConnect(CLGraphNode node)?, bool showOutPort(CLGraphNode node)?, bool showLessonPort(CLGraphNode node)?, CLGraphLayout? layout, bool showArrangeButton = false, Set<String> ? collapsedNodeIds, void onToggleCollapse(String nodeId)?, bool canCollapse(CLGraphNode node)?, void onNodeAction(String nodeId, String actionId, Offset globalPos)?}) -
const
Properties
- canCollapse → bool Function(CLGraphNode node)?
-
final
- canConnect → bool Function(CLGraphNode node)?
-
final
- canDrag → bool Function(CLGraphNode node)?
-
final
-
collapsedNodeIds
→ Set<
String> ? -
final
-
edges
→ List<
CLGraphEdge> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layout → CLGraphLayout?
-
final
-
nodes
→ List<
CLGraphNode> -
final
- onEdgeCreate → void Function(String fromNodeId, String toNodeId, CLGraphEdgeKind kind)?
-
final
- onEdgeDelete → void Function(String edgeId, CLGraphEdgeKind kind)?
-
final
- onNodeAction → void Function(String nodeId, String actionId, Offset globalPos)?
-
Tap su un'icona azione della card (
CLGraphNode.actions).globalPos= la posizione globale del pointer al rilascio (per ancorare un popup lato host).final - onNodeTap → void Function(String nodeId)?
-
final
-
onReparent
→ Future<
bool> Function(String childNodeId, String newParentNodeId)? -
final
- onToggleCollapse → void Function(String nodeId)?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedNodeId → String?
-
final
- showArrangeButton → bool
-
final
- showLessonPort → bool Function(CLGraphNode node)?
-
final
- showOutPort → bool Function(CLGraphNode node)?
-
final
Methods
-
animateOnActionTrigger(
AnimationInfo animationInfo, {bool hasBeenTriggered = false}) → Widget -
Available on Widget, provided by the AnimatedWidgetExtension extension
-
animateOnPageLoad(
AnimationInfo animationInfo) → Widget -
Available on Widget, provided by the AnimatedWidgetExtension extension
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CLNodeGraph> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited