The scenario which I want to implement is a node graph editor. Nodes should be connected with lines and also be draggable.
In my imagination I want something like a canvas, where I can render my controls and lines all together in one place. As far as I know flutter, I can't draw controls on the canvas. So my best guess currently to achieve what I want is:
- Draw my controls on a Stack and place them with the Align widget.
- Draw lines with a CustomPainter which is also placed on the stack. This CustomPainter needs access to the control positions on the Stack to connect them together.
This answer Drawing a line Between Widgets basically provides exactly this approach. But this approach feels not good to me since I have to sync the custom painter and my node widgets. I'm looking for alternatives.