getPoints method
Get a list of all points enclosed by this Rect.
For this operation, the rectangle is treated as a group of columns and rows, so the points on the right column and bottom row are not included.
Implementation
List<Vec2> getPoints() {
var points = <Vec2>[];
for (var y = top; y < bottom; y++) {
for (var x = left; x < right; x++) {
points.add(Vec2(x, y));
}
}
return points;
}