Closed cedarbob closed 3 years ago
Remove Expanded widget and try Interactive Viewer Constrained to true
InteractiveViewer( constrained: true, scaleEnabled: false, boundaryMargin: EdgeInsets.all(100), minScale: 0.01, maxScale: 5.6, child: GraphView( graph: graph, algorithm: BuchheimWalkerAlgorithm(builder), )),
That doesn't help, as you can see in your graphview_example.dart code (the uploaded screenshot for issue #16 shows the bottom edge overflow I'm referring to in this issue). I have not found a good workaround yet, but will investigate whether setting an initial scale for the InteractiveViewer will help.
Same problem.
I just wrap it into Expanded() and change constrained to false.
Expanded(child: InteractiveViewer( constrained: false,....
Wrapping in a FittedBox also seems to work.
When you try to display a graph whose nominal size is larger than the available display size, an exception gets thrown due to an assertion failure ("A renderflex overflowed by x pixels ..."), and Flutter shows a border with yellow/black diagonal stripes on the offending side. Enlarging the window gets rid of it; shrinking the window gets it back. I haven't found an easy workaround yet.