BaseGraphController<E> class abstract

Base controller class that all specific graph controllers should extend

Implementers

Constructors

BaseGraphController({required List<E> items, Size boxSize = const Size(200, 100), double spacing = 20, double runSpacing = 50, GraphOrientation orientation = GraphOrientation.topToBottom, required String idProvider(E data)})

Properties

boxSize Size
getter/setter pair
centerGraph ↔ void Function()?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
idProvider String Function(E data)
getter/setter pair
items List<E>
no setter
nodes List<Node<E>>
no setter
orientation GraphOrientation
getter/setter pair
repaintBoundaryKey GlobalKey<State<StatefulWidget>>
getter/setter pair
roots List<Node<E>>
no setter
runSpacing double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setState ↔ void Function(void function())?
getter/setter pair
spacing double
getter/setter pair
uniqueNodeId String
no setter
viewerController CustomInteractiveViewerController?
getter/setter pair

Methods

addItem(E item, {bool recalculatePosition = true, bool centerGraph = false}) → void
Adds a single item to the chart If an item with the same ID already exists, it will be replaced recalculatePosition determines if the position is to be recalculated directly after adding you might want to add an item but not recalculate the position immediately centerGraph wether to center the chart after adding the item - if recalculatePosition is true
addItems(List<E> items, {bool recalculatePosition = true, bool centerGraph = false}) → void
Adds multiple items to the chart Items with existing IDs will replace the old ones
calculatePosition({bool center = true}) → void
centerNode(String nodeId, {double? scale, bool animate = true, Duration duration = const Duration(milliseconds: 300), Curve curve = Curves.easeInOut}) Future<void>
Centers a specific node in the view
changeNodeIndex(Node<E> node, int index) → void
clearItems({bool recalculatePosition = true, bool centerGraph = false}) → void
Removes all items from the chart
exportAsImage() Future<Uint8List?>
exportAsPdf() Future<Document?>
getOverlapping(Node<E> node) List<Node<E>>
getSize() Size
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replaceAll(List<E> items, {bool recalculatePosition = true, bool centerGraph = false}) → void
Replaces all items in the chart with new items This is more efficient than clearing and adding items separately
setViewerController(CustomInteractiveViewerController controller) → void
Sets the interactive viewer controller for node centering
switchOrientation({GraphOrientation? orientation, bool center = true}) → void
Switch the orientation of the chart
toString() String
A string representation of this object.
inherited

Operators

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