enable lint prefer_final_in_for_each (#47724)
This commit is contained in:
committed by
GitHub
parent
fa337f5922
commit
4f9b6cf017
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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}');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user