Layout class sealed
How to lay out a graph: one of five layouts, each with its own options.
await controller.layout(Layout.tree(direction: TreeDirection.right));
Every layout keeps pinned (locked) nodes where they are and places the other nodes around them. gap is the minimum clearance between nodes.
Constructors
- Layout.circular({double? radius, double gap = 60})
-
Nodes on one circle, in input order. A null
radiusis the smallest that keepsgapbetween neighbours.factory - Layout.force({int iterations = 300, double gap = 60})
-
A force-directed layout of
iterationssimulation steps, with at leastgapbetween nodes.factory -
Layout.grid({int? columns, int? rows, GridFlow flow = GridFlow.rows, double gap = 60, double? rowGap, double? columnGap, Map<
String, GridCell> cells = const {}}) -
Nodes in grid cells that fill in
floworder, wrapping aftercolumnscells of a row orrowscells of a column. Rows and columns size to their largest node.cellsplaces nodes by id in a row, a column or a cell; the others fill the free cells.factory - Layout.layered({LayoutDirection direction = LayoutDirection.down, double gap = 60, double layerGap = 100})
-
A layered (Sugiyama) layout: nodes on layers along
direction, edge crossings reduced,gapbetween nodes of a layer andlayerGapbetween layers.factory - Layout.tree({TreeDirection direction = TreeDirection.down, double gap = 60, double levelGap = 100})
-
A tidy tree: each parent centred over its children, subtrees packed
without overlap,
gapbetween siblings andlevelGapbetween levels. TreeDirection.radial places the levels on concentric rings.factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited