switching channel prompts to run flutter upgrade (#49511)

This commit is contained in:
Prerak Mann
2020-01-31 23:03:29 +05:30
committed by GitHub
parent b5f328e37e
commit 688948b778
2 changed files with 49 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ class ChannelCommand extends FlutterCommand {
}
}
Future<void> _switchChannel(String branchName) {
Future<void> _switchChannel(String branchName) async {
globals.printStatus("Switching to flutter channel '$branchName'...");
if (FlutterVersion.obsoleteBranches.containsKey(branchName)) {
final String alternative = FlutterVersion.obsoleteBranches[branchName];
@@ -124,7 +124,9 @@ class ChannelCommand extends FlutterCommand {
} else if (!FlutterVersion.officialChannels.contains(branchName)) {
globals.printStatus('This is not an official channel. For a list of available channels, try "flutter channel".');
}
return _checkout(branchName);
await _checkout(branchName);
globals.printStatus("Successfully switched to flutter channel '$branchName'.");
globals.printStatus("To ensure that you're on the latest build from this channel, run 'flutter upgrade'");
}
static Future<void> upgradeChannel() async {