Skip to content

Commit 0fd20aa

Browse files
authored
Expand instructions on how to switch to specific version (#11098)
Explains how to switch to a specific Flutter version. This will be used by the Flutter tool's error message when a user attempts to `flutter downgrade` but has never used the `flutter upgrade` command: flutter/flutter#154434 ## Presubmit checklist - [x] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer.
1 parent 018c966 commit 0fd20aa

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

firebase.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@
712712
{ "source": "/to/review-gradle-config", "destination": "/deployment/android#review-the-gradle-build-configuration", "type": 301 },
713713
{ "source": "/to/save-layer-perf", "destination": "/perf/best-practices#use-savelayer-thoughtfully", "type": 301 },
714714
{ "source": "/to/state-management-sample", "destination": "/data-and-backend/state-mgmt/simple", "type": 301 },
715+
{ "source": "/to/switch-flutter-version", "destination": "/release/upgrade/#switching-to-a-specific-flutter-version", "type": 301 },
715716
{ "source": "/to/track-widget-creation", "destination": "/tools/devtools/inspector#track-widget-creation", "type": 301 },
716717
{ "source": "/to/troubleshoot-devices", "destination": "/get-started/install", "type": 301 },
717718
{ "source": "/to/unbounded-constraints", "destination": "/ui/layout/constraints#unbounded", "type": 301 },

src/content/release/upgrade.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,28 @@ $ flutter channel beta
101101
$ flutter upgrade
102102
```
103103

104-
:::note
105-
If you need a specific version of the Flutter SDK,
106-
you can download it from the [Flutter SDK archive][].
107-
:::
104+
105+
## Switching to a specific Flutter version
106+
107+
To switch to a specific Flutter version:
108+
109+
1. Find your desired **Flutter version** on the [Flutter SDK archive][].
110+
111+
1. Navigate to the Flutter SDK:
112+
113+
```console
114+
$ cd /path/to/flutter
115+
```
116+
117+
:::tip
118+
You can find the Flutter SDK's path using `flutter doctor --verbose`.
119+
:::
120+
121+
1. Use `git checkout` to switch to your desired **Flutter version**:
122+
123+
```console
124+
$ git checkout <Flutter version>
125+
```
108126

109127

110128
## Upgrading packages

0 commit comments

Comments
 (0)