getSize method

Offset getSize({
  1. Offset offset = const Offset(0, 0),
})

returns the total size of the graph

Implementation

Offset getSize({Offset offset = const Offset(0, 0)}) {
  for (Node node in _nodes) {
    offset = Offset(
      math.max(offset.dx, node.position.dx),
      math.max(offset.dy, node.position.dy),
    );
  }
  return offset;
}