[tools/] remove many uses of dynamic in the tools/ directory
Change-Id: I1bd930c11e0463ba0de1938ba417b6664c8cdb28 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376023 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
committed by
Commit Queue
parent
db35cbf6d9
commit
dd5b9cd7d7
@@ -44,8 +44,11 @@ Future<List<String>> _testGetConfigurations(String testName) async {
|
||||
queryParameters: {'filter': testName},
|
||||
);
|
||||
final response = await _get(requestUrl);
|
||||
final object = jsonDecode(response);
|
||||
return [for (final result in object['results']) result['configuration']];
|
||||
final object = jsonDecode(response) as Map<String, dynamic>;
|
||||
return [
|
||||
for (final result in ((object['results'] as List)).cast<Map>())
|
||||
result['configuration']
|
||||
];
|
||||
}
|
||||
|
||||
Future<String> _get(Uri requestUrl) async {
|
||||
@@ -100,9 +103,9 @@ Stream<Map<String, dynamic>> _configurationDocuments() async* {
|
||||
},
|
||||
);
|
||||
final response = await _get(requestUrl);
|
||||
final object = jsonDecode(response);
|
||||
final object = jsonDecode(response) as Map<String, dynamic>;
|
||||
yield* Stream.fromIterable(
|
||||
object['documents'].cast<Map<String, dynamic>>());
|
||||
(object['documents'] as List).cast<Map<String, dynamic>>());
|
||||
|
||||
nextPageToken = object['nextPageToken'];
|
||||
} while (nextPageToken != null);
|
||||
|
||||
Reference in New Issue
Block a user