flutter / flutter/flutter-intellij

Refactor WidgetIndentsHighlightingPass and/or add tests here

Open
#6,127 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.