Fix style issues (#122586)
Follow-up to https://github.com/flutter/flutter/pull/121802 resolving some style issues.
This commit is contained in:
parent
5df903a013
commit
788ceb34a3
@ -17,8 +17,7 @@ import 'package:platform/platform.dart' show LocalPlatform, Platform;
|
|||||||
import 'package:pool/pool.dart';
|
import 'package:pool/pool.dart';
|
||||||
import 'package:process/process.dart';
|
import 'package:process/process.dart';
|
||||||
|
|
||||||
const String gobMirror =
|
const String gobMirror = 'https://flutter.googlesource.com/mirrors/flutter';
|
||||||
'https://flutter.googlesource.com/mirrors/flutter';
|
|
||||||
const String githubRepo = 'https://github.com/flutter/flutter.git';
|
const String githubRepo = 'https://github.com/flutter/flutter.git';
|
||||||
const String mingitForWindowsUrl = 'https://storage.googleapis.com/flutter_infra_release/mingit/'
|
const String mingitForWindowsUrl = 'https://storage.googleapis.com/flutter_infra_release/mingit/'
|
||||||
'603511c649b00bbef0a6122a827ac419b656bc19/mingit.zip';
|
'603511c649b00bbef0a6122a827ac419b656bc19/mingit.zip';
|
||||||
@ -450,11 +449,9 @@ class ArchiveCreator {
|
|||||||
while (true) {
|
while (true) {
|
||||||
retries-=1;
|
retries-=1;
|
||||||
try {
|
try {
|
||||||
final Uri packageListingUrl =
|
final Uri packageListingUrl = Uri.parse('https://pub.dev/api/packages/$name');
|
||||||
Uri.parse('https://pub.dev/api/packages/$name');
|
|
||||||
// Fetch the package listing to obtain the package download url.
|
// Fetch the package listing to obtain the package download url.
|
||||||
final http.Response packageListingResponse =
|
final http.Response packageListingResponse = await client.get(packageListingUrl);
|
||||||
await client.get(packageListingUrl);
|
|
||||||
if (packageListingResponse.statusCode != 200) {
|
if (packageListingResponse.statusCode != 200) {
|
||||||
throw Exception('Downloading $packageListingUrl failed. Status code ${packageListingResponse.statusCode}.');
|
throw Exception('Downloading $packageListingUrl failed. Status code ${packageListingResponse.statusCode}.');
|
||||||
}
|
}
|
||||||
@ -511,8 +508,7 @@ class ArchiveCreator {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
final Map<String, dynamic> cacheDescription =
|
final Map<String, dynamic> cacheDescription = json.decode(await _runFlutter(<String>['pub', 'cache', 'list'])) as Map<String, dynamic>;
|
||||||
json.decode(await _runFlutter(<String>['pub', 'cache', 'list'])) as Map<String, dynamic>;
|
|
||||||
final Map<String, dynamic> packages = cacheDescription['packages'] as Map<String, dynamic>;
|
final Map<String, dynamic> packages = cacheDescription['packages'] as Map<String, dynamic>;
|
||||||
final List<Future<void>> downloads = <Future<void>>[];
|
final List<Future<void>> downloads = <Future<void>>[];
|
||||||
for (final MapEntry<String, dynamic> package in packages.entries) {
|
for (final MapEntry<String, dynamic> package in packages.entries) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user