Create when offline style (#101589)

This commit is contained in:
Jesús S Guerrero 2022-04-11 14:14:05 -05:00 committed by GitHub
parent 63a6e9005d
commit 2302daa3aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -1301,11 +1301,10 @@ abstract class FlutterCommand extends Command<void> {
if (shouldUpdateCache) {
// First always update universal artifacts, as some of these (e.g.
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
bool offline;
final bool offline;
if (argParser.options.containsKey('offline')) {
offline = boolArg('offline');
}
else {
} else {
offline = false;
}
await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal}, offline: offline);

View File

@ -42,8 +42,7 @@ class FakePub extends Fake implements Pub {
fs.directory(directory).childFile('.packages').createSync();
if (offline == true) {
calledGetOffline += 1;
}
else {
} else {
calledOnline += 1;
}
}