StaticLayoutAlgorithm constructor

StaticLayoutAlgorithm({
  1. required Graph graph,
})

Implementation

StaticLayoutAlgorithm({
  required this.graph,
}) {
  // Initially assign random positions within the unit square.
  for (final node in graph.adjacencyList.keys) {
    nodeLayout[node] = Vector2.random();
  }
}