enable lint prefer_final_in_for_each (#47724)
This commit is contained in:
committed by
GitHub
parent
fa337f5922
commit
4f9b6cf017
@@ -79,7 +79,7 @@ void beginFrame(Duration timeStamp) {
|
||||
void handlePointerDataPacket(ui.PointerDataPacket packet) {
|
||||
// The pointer packet contains a number of pointer movements, which we iterate
|
||||
// through and process.
|
||||
for (ui.PointerData datum in packet.data) {
|
||||
for (final ui.PointerData datum in packet.data) {
|
||||
if (datum.change == ui.PointerChange.down) {
|
||||
// If the pointer went down, we change the color of the circle to blue.
|
||||
color = const ui.Color(0xFF0000FF);
|
||||
|
||||
@@ -94,7 +94,7 @@ class RenderDots extends RenderBox {
|
||||
canvas.drawRect(offset & size, Paint()..color = const Color(0xFFFFFFFF));
|
||||
|
||||
// We iterate through our model and paint each dot.
|
||||
for (Dot dot in _dots.values)
|
||||
for (final Dot dot in _dots.values)
|
||||
dot.paint(canvas, offset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class RenderDots extends RenderConstrainedBox {
|
||||
canvas.drawRect(offset & size, Paint()..color = const Color(0xFF0000FF));
|
||||
|
||||
final Paint paint = Paint()..color = const Color(0xFF00FF00);
|
||||
for (Offset point in _dots.values)
|
||||
for (final Offset point in _dots.values)
|
||||
canvas.drawCircle(point, 50.0, paint);
|
||||
|
||||
super.paint(context, offset);
|
||||
|
||||
Reference in New Issue
Block a user