3 Steps using Flutter multiple versions in VS code.
Now Flutter has became to 3.0.5 version but some friends are still using Flutter 1 or Flutter 2 for development, so how can we handle multiple versions?
This article I will introduce this method to handle and using VS code as a editer.
For example if now you have flutter2 in your laptop, then you would like to install Flutter3 as well, please follow these steps.
1. First step,
download Flutter 3 from official webpage
(select the version following to your CPU).
Then you can extract zip file to be flutter folder and rename the name as you needed to prevent duplicated folder.
2. Second step,
we will create
alias for calling Flutter3 when want to use.
- Go to
.zshrcfile in Home (cmd + shift + H) and put this command inside (don’t forget to change location path to be correct one)>
In this method then you will be able to call flutter3 by typing
3. Last step,
we will do config “Setting File Location” in vscode like this.
- Open VS code.
- Open file
settings.jsonfrom this path.
or if you don’t using macOS please follow this location path.
- Then add
flutterSdkPathsinto file like this.
Now you can use alias
flutter3 to do anthing, and also
flutter2 too in case of other versions.
In VS code you can change flutter version very easy like below.
or just click to
Flutter:3.0.5in bottom bar to change version.
If you think it’s useful for you, just clap your hands 👏 to be encouraged me.
GRASSROOT ENGINEER 😘