ForceGraphController class

Inheritance

Constructors

ForceGraphController({bool graphBuilderDebugLogs = kDebugMode, bool enableSelection = true, bool animateBorders = false, bool animateBorderOnlyIfSelected = false, Duration animateBordersDuration = const Duration(milliseconds: 5000), double nodeLinearDamping = 3.5, double? nodeDragMaxForce, bool staticNodes = false, double nodeDragDamping = 1, double? nodeMinimumSpacing = 0, bool removeNodeCascade = true, List<ForceGraphNodeData> nodes = const [], bool enableNodesAutoMove = false, int? maxSelection = 1, double jointDamping = 1, double jointFrequency = 1, bool uniformEdgeWeight = false, ForceDirectedGraphBuilder? graphBuilder, bool enableAutoCenterOnNodeSelection = true, Color? edgeHighlightColor, Color? edgeHightlightColor, double? edgeHiddenOpacity, double? nodeHiddenOpacity, bool disableHoverOnHiddenComponents = true, NodeLabelVisibility nodeLabelVisibility = NodeLabelVisibility.hoveredOrSelected, Duration hoverEnterDebounceDuration = const Duration(milliseconds: 10), Duration hoverExitDebounceDuration = const Duration(milliseconds: 200), double scale = 10, double minZoom = 0.1, double maxZoom = 2, double? initialZoom})

Properties

$_hoveredEdgeID ↔ int?
getter/setter pair
$_hoveredNodeID ↔ String?
getter/setter pair
animateBorderOnlyIfSelected → bool
final
animateBorders → bool
final
animateBordersDuration → Duration
final
canAutoMove → bool
no setter
disableHoverOnHiddenComponents → bool
final
edgeHiddenOpacity ↔ double?
getter/setter pair
edgeHighlightColor ↔ Color?
getter/setter pair
edgeHightlightColor ↔ Color?
getter/setter pair
enableAutoCenterOnNodeSelection → bool
final
enableNodesAutoMove → bool
final
enableSelection → bool
final
error → Object?
no setter
graphBuilder ↔ ForceDirectedGraphBuilder
getter/setter pair
ground → Body
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
hoveredEdge → ForceGraphEdge?
no setter
hoveredNode → ForceGraphNode?
no setter
hoverEnterDebounceDuration → Duration
final
hoverExitDebounceDuration → Duration
final
hoverPosition → Offset?
no setter
isDraggingNode → bool
no setter
isHovering → bool
no setter
isHoveringEdge → bool
no setter
isHoveringNode → bool
no setter
isLoading → bool
no setter
isPanning → bool
no setter
isPhysicallyHoveringNode → bool
no setter
isReady → bool
no setter
isSelecting → bool
no setter
jointDamping → double
final
jointFrequency → double
final
joints → UnmodifiableListView<ForceGraphEdge>
no setter
loadingProgress → double?
no setter
loadingProgressStep → int
no setter
loadingTotalStep → int?
no setter
maxSelection ↔ int?
getter/setter pair
nodeDragDamping → double
final
nodeDragMaxForce → double?
final
nodeHiddenOpacity ↔ double?
getter/setter pair
nodeLabelVisibility ↔ NodeLabelVisibility
getter/setter pair
nodeLinearDamping ↔ double
getter/setter pair
nodeMinimumSpacing → double?
final
nodes → UnmodifiableListView<ForceGraphNode>
no setter
panningMode → bool
no setter
removeNodeCascade → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenSelectionRect → Rect?
no setter
selectedNodes → List<ForceGraphNode>
no setter
staticNodes → bool
final
ticker → Ticker
no setter
uniformEdgeWeight → bool
final
viewportController → ViewportController
final
world → World
final
worldSelectionRect → Rect?
no setter

Methods

addEdge(ForceGraphEdgeData edgeData) → ForceGraphEdge?
Dynamically add an edge between two existing nodes.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addNode(ForceGraphNodeData nodeData, {Vector2? position, bool select = false}) → ForceGraphNode
Dynamically add a node to the graph at runtime.
addNodeOnSecondaryTapListener(void onSecondaryTap(ForceGraphNode, Offset)) → void
addOnHoverListener(void onHover(ForceGraphNode? node, bool programatical)) → void
addOnSecondaryTapListener(void onSecondaryTap(Offset offset)) → void
addOnSelectionChangedListener(void onSelectionChanged(List<ForceGraphNode>)) → void
addOnTapListener(void onTap(ForceGraphNode)) → void
clear({bool notify = true}) → void
Clears all the data in the graph controller. This is useful for when the data is changed and the graph needs to be rebuilt.
clearNodeForces() → void
clearSelection() → void
dispose() → void
Discards any resources used by the object.
override
disposeTicker() → void
findBodyAt(Vector2? worldPoint, {double? touchTolerance}) → ForceGraphNode?
findJointAt(Vector2? mouseWorldPosition) → ForceGraphEdge?
focusNode(String nodeID) → void
getNode(String nodeID) → ForceGraphNode
getNodeOrNull(String nodeID) → ForceGraphNode?
highlightNodes(Iterable<String> nodeIDs) → void
Highlights specified nodes and dims all other nodes.
hoverEdge(int? edgeID, {bool programatical = true}) → bool
hoverNode(String? nodeID, {bool animateToCenter = false, bool programatical = true}) → bool
initWorld(TickerProvider vsync) → void
loadDataFrom(List<ForceGraphNodeData> nodes, {bool notifyReadyStatusChange = true, ForceDirectedGraphBuilder? graphBuilder}) → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pause() → void
recenter([bool adjustZoom = true]) → void
reload() → Future<void>
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeNode(String nodeID) → Set<String>
removeNodeOnSecondaryTapListener(void onSecondaryTap(ForceGraphNode, Offset)) → void
removeOnHoverListener(void onHover(ForceGraphNode? node, bool programatical)) → void
removeOnSecondaryTapListener(void onSecondaryTap(Offset offset)) → void
removeOnSelectionChangedListener(void onSelectionChanged(List<ForceGraphNode>)) → void
removeOnTapListener(void onTap(ForceGraphNode)) → void
resetHighlights() → void
Resets opacity of all nodes to normal or selection highlights.
resume() → void
searchNodes(String query) → List<ForceGraphNode>
Searches nodes matching the query string by id or title.
selectAllNodes() → void
selectNode(String nodeID, {bool animateToCenter = true}) → void
selectNodes(Iterable<String> nodeIDs) → void
setClickingMode() → void
setPanningMode() → void
startDragging(Body body, Vector2 targetWorld) → void
startNodesAutoMove() → void
startSelecting(Vector2 worldTouch) → void
stop() → void
stopDragging() → void
stopNodesAutoMove() → void
stopSelecting() → void
toggleSelectNode(String nodeID, {bool animateToCenterOnSelect = true}) → void
toggleSelectNodes(Iterable<String> nodeIDs) → void
toString() → String
A string representation of this object.
inherited
unselectAllNodes() → void
unselectNode(String nodeID) → void
unselectNodes(Iterable<String> nodeIDs) → void
updateCanvasSize(Size size) → void
zoomOnNode(String nodeID, {double? zoom, bool force = false, Curve curve = Curves.linear, Duration? animationDuration}) → Future<void>

Operators

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