DirectGraph class

Inheritance

Constructors

DirectGraph({Key? key, required List<NodeInput> list, required Size defaultCellSize, required EdgeInsets cellPadding, Clip clipBehavior = Clip.hardEdge, bool centered = false, NodeCellBuilder? nodeBuilder, double contactEdgesDistance = 5.0, MatrixOrientation orientation = MatrixOrientation.Horizontal, double tipAngle = math.pi * 0.1, double tipLength = 10.0, double maxScale = 2.5, double minScale = 0.25, EdgePathBuilder? pathBuilder, EdgePaintBuilder? paintBuilder, OverlayBuilder? overlayBuilder, EdgeLabels? edgeLabels, GestureBackgroundTapCallback? onCanvasTap, GestureEdgeTapDownCallback? onEdgeTapDown, GestureEdgeTapUpCallback? onEdgeTapUp, GestureEdgeLongPressStartCallback? onEdgeLongPressStart, GestureEdgeLongPressEndCallback? onEdgeLongPressEnd, GestureEdgeLongPressMoveUpdateCallback? onEdgeLongPressMoveUpdate, GestureEdgeForcePressStartCallback? onEdgeForcePressStart, GestureEdgeForcePressEndCallback? onEdgeForcePressEnd, GestureEdgeForcePressPeakCallback? onEdgeForcePressPeak, GestureEdgeForcePressUpdateCallback? onEdgeForcePressUpdate, GestureEdgeTapDownCallback? onEdgeSecondaryTapDown, GestureEdgeTapUpCallback? onEdgeSecondaryTapUp, GestureNodeTapDownCallback? onNodeTapDown, GestureNodeTapUpCallback? onNodeTapUp, GestureNodeLongPressStartCallback? onNodeLongPressStart, GestureNodeLongPressEndCallback? onNodeLongPressEnd, GestureNodeLongPressMoveUpdateCallback? onNodeLongPressMoveUpdate, GestureNodeForcePressStartCallback? onNodeForcePressStart, GestureNodeForcePressEndCallback? onNodeForcePressEnd, GestureNodeForcePressPeakCallback? onNodeForcePressPeak, GestureNodeForcePressUpdateCallback? onNodeForcePressUpdate, GestureNodePanStartCallback? onNodePanStart, GestureNodePanUpdateCallback? onNodePanUpdate, GestureNodePanDownCallback? onNodePanDown, GestureNodeTapDownCallback? onNodeSecondaryTapDown, GestureNodeTapUpCallback? onNodeSecondaryTapUp})
Draw direct graph using list of NodeInput's as source.

Properties

cellPadding EdgeInsets
Padding between nodes. By increasing it's value edges length is also increased.
final
centered bool
if set to true all node outcomes will be centered relatively to it's parent as much as it's possible in rectangular space. Useful to create tree-like structures with Alignment.center. Defaults to false.
final
clipBehavior Clip
Value for internal InteractiveViewer.clipBehavior and Stack.clipBehavior.
final
contactEdgesDistance double
Distance between backward and forward oriented edge when they enter the same node. Defaults to 5.0. Set it to zero if you need to center all edges entry points.
final
defaultCellSize Size
Default cell size for any node where NodeInput.size is null.
final
edgeLabels EdgeLabels?
List of params to draw labels on top or above the edges. Useful to comment relations between entities.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
list List<NodeInput>
Graph source defined as list of NodeInput's. Root or entry point for graph is selected as first found node without incomes or the first node in the list if there's no nodes without incomes.
final
maxScale double
Value for internal InteractiveViewer.maxScale.
final
minScale double
Value for internal InteractiveViewer.minScale.
final
nodeBuilder NodeCellBuilder?
Builder function to render custom node Widget. Fires upon each node build call and provides info about node as MatrixNode.
final
onCanvasTap GestureBackgroundTapCallback?
GestureDetector.onTapDown event on any point inside canvas. Maybe used to bind action cancel event.
final
onEdgeForcePressEnd GestureEdgeForcePressEndCallback?
GestureDetector.onForcePressEnd for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeForcePressPeak GestureEdgeForcePressPeakCallback?
GestureDetector.onForcePressPeak for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeForcePressStart GestureEdgeForcePressStartCallback?
GestureDetector.onForcePressStart for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeForcePressUpdate GestureEdgeForcePressUpdateCallback?
GestureDetector.onForcePressUpdate for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeLongPressEnd GestureEdgeLongPressEndCallback?
GestureDetector.onLongPressEnd for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeLongPressMoveUpdate GestureEdgeLongPressMoveUpdateCallback?
GestureDetector.onLongPressMoveUpdate for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeLongPressStart GestureEdgeLongPressStartCallback?
GestureDetector.onLongPressStart for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeSecondaryTapDown GestureEdgeTapDownCallback?
GestureDetector.onTapDown for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeSecondaryTapUp GestureEdgeTapUpCallback?
GestureDetector.onTapUp for edge. Has two times wider hitbox then edges width to improve UX.
final
onEdgeTapDown GestureEdgeTapDownCallback?
GestureDetector.onTapDown
final
onEdgeTapUp GestureEdgeTapUpCallback?
GestureDetector.onTapUp for edge. Has two times wider hitbox then edges width to improve UX.
final
onNodeForcePressEnd GestureNodeForcePressEndCallback?
GestureDetector.onForcePressEnd for node widget.
final
onNodeForcePressPeak GestureNodeForcePressPeakCallback?
GestureDetector.onForcePressPeak for node widget.
final
onNodeForcePressStart GestureNodeForcePressStartCallback?
GestureDetector.onForcePressStart for node widget.
final
onNodeForcePressUpdate GestureNodeForcePressUpdateCallback?
GestureDetector.onForcePressUpdate for node widget.
final
onNodeLongPressEnd GestureNodeLongPressEndCallback?
GestureDetector.onLongPressEnd for node widget.
final
onNodeLongPressMoveUpdate GestureNodeLongPressMoveUpdateCallback?
GestureDetector.onLongPressMoveUpdate for node widget.
final
onNodeLongPressStart GestureNodeLongPressStartCallback?
GestureDetector.onLongPressStart for node widget.
final
onNodePanDown GestureNodePanDownCallback?
GestureDetector.onPanDown for node widget.
final
onNodePanStart GestureNodePanStartCallback?
GestureDetector.onPanStart for node widget.
final
onNodePanUpdate GestureNodePanUpdateCallback?
GestureDetector.onPanUpdate for node widget.
final
onNodeSecondaryTapDown GestureNodeTapDownCallback?
GestureDetector.onSecondaryTapDown for node widget.
final
onNodeSecondaryTapUp GestureNodeTapUpCallback?
GestureDetector.onSecondaryTapUp for node widget.
final
onNodeTapDown GestureNodeTapDownCallback?
GestureDetector.onTapDown for node widget.
final
onNodeTapUp GestureNodeTapUpCallback?
GestureDetector.onTapUp for node widget.
final
orientation MatrixOrientation
Output graph with MatrixOrientation.Horizontal orientation or MatrixOrientation.Vertical. Use MatrixOrientation.Horizontal for row views and MatrixOrientation.Vertical for column views.
final
overlayBuilder OverlayBuilder?
Builder function to render custom Widget on top of the graph inside InteractiveViewer. Fires upon each build call and provides info about all current nodes and edges including their position (x,y) in Stack. Return Positioned Widget with coordinates in particular position to create interactive tooltips.
final
paintBuilder EdgePaintBuilder?
Path builder function to draw custom shaped edges. Called on each canvas render cycle, provides info about each edge as Edge. If set, arrows on tip of each path wont be added.
final
pathBuilder EdgePathBuilder?
Paint builder function to provide custom style for node edges. Called on each canvas render cycle, provides info about each edge as Edge.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tipAngle double
tipAngle is the angle (in radians) between each of the 2 lines making the arrow and the curve at this point. Ignored if using custom pathBuilder is set.
final
tipLength double
is the length (in pixels) of each of the 2 lines making the arrow. Ignored if using custom pathBuilder is set.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DirectGraphState
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}) 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