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

@@ -211,7 +211,7 @@ void main() {
FakeRequest(Uri.parse('http://localhost'), method: HttpMethod.put, responseError: const OSError('Connection Reset by peer')),
FakeRequest(Uri.parse('http://localhost'), method: HttpMethod.put, responseError: const OSError('Connection Reset by peer')),
// This is the value of `<int>[1, 2, 3, 4, 5]` run through `osUtils.gzipLevel1Stream`.
FakeRequest(Uri.parse('http://localhost'), method: HttpMethod.put, body: <int>[for (List<int> chunk in expectedEncoded) ...chunk]),
FakeRequest(Uri.parse('http://localhost'), method: HttpMethod.put, body: <int>[for (final List<int> chunk in expectedEncoded) ...chunk]),
]),
uploadRetryThrottle: Duration.zero,
);

View File

@@ -737,7 +737,7 @@ void main() {
method: kListViewsMethod,
jsonResponse: <String, Object>{
'views': <Object>[
for (FlutterView view in views) view.toJson(),
for (final FlutterView view in views) view.toJson(),
],
},
),