skill_tree library

Classes

ChildDetails<ParentDataType extends ParentData>
DraggableNode<NodeType, IdType extends Object>
Edge<EdgeType, IdType extends Object>
EdgeDetails<EdgeType, NodeType, IdType extends Object>
Graph<EdgeType, NodeType, IdType extends Object>
This a class to hold logic related to an abstract graph and its operations and should NOT be in any way related to UI or rendering.
LayeredGraph<EdgeType, NodeType, IdType extends Object>
LayeredTreeDelegate<EdgeType, NodeType, IdType extends Object>
MultiChildEdge<EdgeType, NodeType, IdType extends Object>
Node<NodeType, IdType extends Object>
A Node is a node in the SkillTree. Parent and child information is not stored here but in the edges. This is done to keep cyclic graphs possible.
NodeDetails<NodeType, IdType extends Object>
PositionedGraph<EdgeType, NodeType, IdType extends Object>
RenderMultiChildEdge<EdgeType, NodeType, IdType extends Object>
The fields of this RenderObject are initialized in the layout phase. This is because we must first know the size of the node widgets.
RenderSkillTree<EdgeType, NodeType, IdType extends Object>
This class provides useful abstractions across both the graph theory model and the render model.
SkillEdge<EdgeType, NodeType, IdType extends Object>
An edge that will be rendered as a line between two widget vertices.
SkillEdgeParentData<EdgeType, IdType extends Object>
SkillNode<NodeType, IdType extends Object>
A representation of a node in the skill tree.
SkillNodeLayout<NodeType, IdType extends Object>
SkillNodeParentData<NodeType, IdType extends Object>
SkillParentData
A super parent data class that is temporarily initialized in RenderSkillTree to later then be converted to SkillNodeParentData or SkillEdgeParentData respective of the type of the child.
SkillTree<EdgeType, NodeType, IdType extends Object>
A widget to create a skill tree. This assumes a digraph structure. That is, edges are directed.
SkillTreeDelegate<EdgeType, NodeType, IdType extends Object, GraphType extends Graph<EdgeType, NodeType, IdType>>
A delegate decides the layout to be used for the skill tree

Extensions

CastEdge on Edge<EdgeType, IdType>
NodeCopyWith on Node<NodeType, IdType>

Functions

defaultCubicEdgePathBuilder({required Offset toNodeCenter, required Offset fromNodeCenter, required List<Rect> allNodeRects, required List<Offset> controlPointCenters}) Path
defaultCubicEdgePathPainter({required Path path, required Canvas canvas}) → void
defaultEdgePathBuilder({required Offset toNodeCenter, required Offset fromNodeCenter, required List<Rect> allNodeRects, required List<Offset> controlPointCenters}) Path
The most basic edge painter that returns a line between two points.
defaultEdgePathPainter({required Path path, required Canvas canvas}) → void
Draws a line with a small shadow between two nodes

Typedefs

EdgeBuilder<EdgeType, NodeType, IdType extends Object, GraphType extends Graph<EdgeType, NodeType, IdType>> = SkillEdge<EdgeType, NodeType, IdType> Function(Edge<EdgeType, IdType> edge, GraphType graph)
EdgePathBuilder = Path Function({required List<Rect> allNodeRects, required List<Offset> controlPointCenters, required Offset fromNodeCenter, required Offset toNodeCenter})
EdgePathPainter = void Function({required Canvas canvas, required Path path})
NodeBuilder<EdgeType, NodeType, IdType extends Object, GraphType extends Graph<EdgeType, NodeType, IdType>> = SkillNode<NodeType, IdType> Function(Node<NodeType, IdType> node, GraphType graph)
ValueUpdater<T> = T Function(T value)