flutter-intellij
flutter-intellij copied to clipboard
Refactor WidgetIndentsHighlightingPass and/or add tests here
This logic in paint is finicky and very hard to follow; I suspect we could do better.
As a first step, perhaps extract the contents of paint into a separate function generateLines that returns a collection of lines to paint (with x, y positions), then have paint only render these.
e.g.:
class LinesToPaint {
int startX;
int startY;
...
}
in paint:
LinePainter2D.paint(
g2d,
lineToPaint.startX,
lineToPaint.startY,
...
);
And then we can at least test generateLines for regressions.