3 Steps using Flutter multiple versions in VS code.

Grassroot Engineer
3 min readJul 25, 2022

--

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).

https://docs.flutter.dev/get-started/install/macos

Then you can extract zip file to be flutter folder and rename the name as you needed to prevent duplicated folder.

Extract zip file and rename to “flutter3”

2. Second step,

we will create alias for calling Flutter3 when want to use.

  • Go to .zshrc file in Home (cmd + shift + H) and put this command inside (don’t forget to change location path to be correct one)>
alias flutter3="/Users/atthana/development/flutter3/bin/flutter"

In this method then you will be able to call flutter3 by typing flutter3

3. Last step,

we will do config “Setting File Location” in vscode like this.

  • Open VS code.
  • Open file settings.json from this path.

/Users/atthana/Library/Application Support/Code/User

or if you don’t using macOS please follow this location path.

https://riptutorial.com/visual-studio-code/learn/100008/user-and-workspace-settings
  • Then add flutterSdkPaths into file like this.
Add “location of flutter3 folder” into settings.json

FINISH !

Now you can use alias flutter3 to do angthing, and also flutter or flutter2 too in case of other versions.

call “flutter3 — version” to check version.

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 😘

--

--

Grassroot Engineer
Grassroot Engineer

Written by Grassroot Engineer

ATM engineer who is interested in CODING and believe in EFFORT. — https://grassrootengineer.com

Responses (1)