Graph layout
Package: vyuh_diagram_extension_layout. Optional commercial extension; import it alongside vyuh_diagram_flutter in a Flutter application, or alongside core in Dart.
Public entry points
const LayoutExtension(), id vyuh.layout, performs every Layout: layered, tree (including radial), force, circular and grid. Install it in the configuration's extensions; its algorithms are headless, and shared rendering consumes their output.
dart
final controller = DiagramController(
configuration: DiagramConfiguration(extensions: [const LayoutExtension()]),
);
await controller.edits.layout(Layout.tree(direction: TreeDirection.right));layoutGraph(GraphLayoutRequest request, Layout layout) runs a layout synchronously on the calling isolate, for importers that place nodes before any controller exists. Without pinned nodes, its result's top-left corner is the origin.
See layout API for the layouts, their options and the shared verbs.