-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Update the "Upgrading Flutter" page #1980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great update, thanks! I have a few suggestions, but otherwise LGTM!
If you've modified your `pubspec.yaml` file, or you want to only update | ||
the packages your app depends upon instead of both the packages and | ||
Flutter itself, then use the following commands: | ||
## Upgrading only packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading only packages -> Upgrading packages only (?)
switch to a less stable Flutter channel | ||
and then run `flutter upgrade`. | ||
|
||
### Switching your Flutter channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Consider making this a level 2 heading.
- Switching your Flutter channel -> Switching Flutter channels (?)
$ flutter channel # Shows your current channel | ||
$ flutter channel dev # Changes your channel to the dev channel | ||
$ flutter upgrade # Get the Flutter SDK and dependent packages | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of having comments in the terminal
code blocks because it makes it a bit more difficult to copy the terminal command. (Also, it makes for duplication -- similar text appears in the prose and terminal blocks.)
How about something like the following?
To view your current channel, use the following command:
$ flutter channel
To change to another channel, use flutter channel <channel-name>
. Once you've changed your channel, use flutter upgrade
to download the Flutter SDK and dependent packages. For example:
$ flutter channel dev
$ flutter upgrade
use the `get` command: | ||
|
||
```terminal | ||
$ flutter packages get # Gets all dependencies, without unnecessary updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop the terminal comment (and/or move some of it into the prose).
use the `upgrade` command: | ||
|
||
```terminal | ||
$ flutter packages upgrade # Gets the most recent versions that should work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto (drop terminal comment)
correct package for you. | ||
|
||
Do not use the `pub get` or `pub upgrade` commands to manage your dependencies. | ||
{{site.alert.warning}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea to make this a warning (although I'll have to look into why the associated color is red).
Fixes #1885.
It started as a little fix, then snowballed... Let me know if I'm off base. (I guessed at a few things.)
Staged: https://kw-flutter-1.firebaseapp.com/docs/development/tools/sdk/upgrading
/cc @sfshaza2