Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 2302daa

Browse files
authored
Create when offline style (#101589)
1 parent 63a6e90 commit 2302daa

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

packages/flutter_tools/lib/src/runner/flutter_command.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,11 +1301,10 @@ abstract class FlutterCommand extends Command<void> {
13011301
if (shouldUpdateCache) {
13021302
// First always update universal artifacts, as some of these (e.g.
13031303
// ios-deploy on macOS) are required to determine `requiredArtifacts`.
1304-
bool offline;
1304+
final bool offline;
13051305
if (argParser.options.containsKey('offline')) {
13061306
offline = boolArg('offline');
1307-
}
1308-
else {
1307+
} else {
13091308
offline = false;
13101309
}
13111310
await globals.cache.updateAll(<DevelopmentArtifact>{DevelopmentArtifact.universal}, offline: offline);

packages/flutter_tools/test/commands.shard/hermetic/create_usage_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ class FakePub extends Fake implements Pub {
4040
bool printProgress = true,
4141
}) async {
4242
fs.directory(directory).childFile('.packages').createSync();
43-
if (offline == true){
43+
if (offline == true) {
4444
calledGetOffline += 1;
45-
}
46-
else {
45+
} else {
4746
calledOnline += 1;
4847
}
4948
}

0 commit comments

Comments
 (0)