enable lint prefer_final_in_for_each (#47724)

This commit is contained in:
Alexandre Ardhuin
2020-01-07 16:32:04 +01:00
committed by GitHub
parent fa337f5922
commit 4f9b6cf017
369 changed files with 1219 additions and 1220 deletions

View File

@@ -105,7 +105,7 @@ class FakeCommand {
if (environment == null) {
return false;
}
for (String key in environment.keys) {
for (final String key in environment.keys) {
if (environment[key] != this.environment[key]) {
return false;
}

View File

@@ -399,7 +399,7 @@ class MemoryIOSink implements IOSink {
@override
void writeAll(Iterable<dynamic> objects, [ String separator = '' ]) {
bool addSeparator = false;
for (dynamic object in objects) {
for (final dynamic object in objects) {
if (addSeparator) {
write(separator);
}

View File

@@ -139,7 +139,7 @@ class Testbed {
}
await test();
Cache.flutterRoot = originalFlutterRoot;
for (MapEntry<Timer, StackTrace> entry in timers.entries) {
for (final MapEntry<Timer, StackTrace> entry in timers.entries) {
if (entry.key.isActive) {
throw StateError('A Timer was active at the end of a test: ${entry.value}');
}