I'm quite new to flutter and dart. I'm trying to draw a tree view using the GraphView library. I'm able to generate the tree and also the panning is working very well. The main problem is that tree nodes have to be clickable, but once the tree expands over the main window size the "outside" nodes are no more clickable.
To better explain this is the tree. After panning to the right the green line is the on initState view right margin. All the nodes on the left of this line are touchable, while on the right they are not touchable.
The code I produced to show this view is the following:
Widget build(BuildContext context) {
return InteractiveViewer(
clipBehavior: Clip.none,
panEnabled: true,
minScale: 0.35,
maxScale: 1,
boundaryMargin: EdgeInsets.all(double.infinity),
child: OverflowBox(
alignment: Alignment.center,
minWidth: 0.0,
minHeight: 0.0,
maxWidth: double.infinity,
maxHeight: double.infinity,
child: GraphView(
algorithm: BuchheimWalkerAlgorithm(
builder,
TreeEdgeRenderer(builder),
),
graph: graph,
paint: Paint()
..color = Colors.green
..strokeWidth = 1
..style = PaintingStyle.stroke,
builder: (Node node) {
int a = node.key!.value;
if (a == 0) {
return rectangleWidget("ROOT", a, NodeType.ROOT, 99);
} else {
AttackTreeNode attackTreeNode =
dataManager.rootNode.findNode(a);
return rectangleWidget(
attackTreeNode.name, a, attackTreeNode.nodeType, attackTreeNode.score);
}
}),
),
);
}
Thank you in advice for your help!