Closed gfiury closed 3 years ago
There is a problem with the constrains or size of the Graph
I/flutter (29557): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (29557): The following assertion was thrown during performLayout():
I/flutter (29557): RenderCustomLayoutBox does not meet its constraints.
I/flutter (29557): Constraints:
I/flutter (29557): BoxConstraints(0.0<=w<=411.4, h=710.0)
I/flutter (29557): Size:
I/flutter (29557): Size(487.0, 310.0)
If the graph is small enough it can be seen correctly, but If I add another level (leaf), it doesn't work
Fixed it, it would be great if the example has comments, the important changes are the Expanded
and the constrained: false
and also scaleEnabled: false
Expanded(child: InteractiveViewer(
constrained: false,
scaleEnabled: false,
boundaryMargin: EdgeInsets.all(100),
minScale: 0.01,
maxScale: 5.6,
child: GraphView(
graph: graph,
algorithm: BuchheimWalkerAlgorithm(
builder, TreeEdgeRenderer(builder)),
paint: Paint()
..color = Colors.green
..strokeWidth = 1
..style = PaintingStyle.stroke,
)))
Hi,
Currently I'm trying to graph a Top to Bottom diagram. I'm having trouble to make the nodes visible on a phone, they are somewhere else placed on the screen. The picture is the example of TreeViewPage without changes
Phone: Galaxy S10 Android: 10
On the contrary on a Android Tablet works just fine with Android 9
What I need to change/configure to fix the Phone view?
Regards, William