Update collection-fors to prefer final (as per updated prefer_final_in_for_each) (#127511)
The newly updated lint will soon flag for-each in collections. See discussion: https://github.com/dart-lang/linter/pull/4383 /cc @goderbauer
This commit is contained in:
@@ -21,7 +21,7 @@ class OpacityPeepholePage extends StatelessWidget {
|
||||
body: ListView(
|
||||
key: const Key(kOpacityScrollableName),
|
||||
children: <Widget>[
|
||||
for (OpacityPeepholeCase variant in allOpacityPeepholeCases)
|
||||
for (final OpacityPeepholeCase variant in allOpacityPeepholeCases)
|
||||
ElevatedButton(
|
||||
key: Key(variant.route),
|
||||
child: Text(variant.name),
|
||||
|
||||
@@ -86,7 +86,7 @@ Future<void> main() async {
|
||||
watch.start();
|
||||
for (int i = 0; i < 10; i += 1) {
|
||||
await Future.wait(<Future<ui.ImmutableBuffer>>[
|
||||
for (String asset in assets)
|
||||
for (final String asset in assets)
|
||||
rootBundle.loadBuffer(asset)
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user