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:
Phil Quitslund
2023-05-26 16:34:36 -07:00
committed by GitHub
parent 1a062a0978
commit 5bf6318688
25 changed files with 32 additions and 32 deletions

View File

@@ -49,7 +49,7 @@ class ABTest {
static Map<String, List<double>> _convertFrom(dynamic results) {
final Map<String, dynamic> resultMap = results as Map<String, dynamic>;
return <String, List<double>> {
for (String key in resultMap.keys)
for (final String key in resultMap.keys)
key: (resultMap[key] as List<dynamic>).cast<double>(),
};
}