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:
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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(),
|
||||
],
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user