How To Run Multiple Flutter Versions on macOS by@altynberg

How To Run Multiple Flutter Versions on macOS

Altynbek Usenbekov HackerNoon profile picture

Altynbek Usenbekov

Software Developer | Co-founder of Alto's POS

Sometimes we need to have multiple Flutter versions on the same machine for different projects. To do this, we should download multiple versions and add those paths to the bash_profile file and our IDE. I will use macOS and Visual Studio Code.

I assume that Flutter is already installed. So we should already have a Flutter SDK folder. Let's download a different version of Flutter and place it in the same folder as the current SDK folder.

In my case, as a default, I had an older version of Flutter. In addition to that, I downloaded the stable channel and renamed it

. Now I have two versions in two different paths:


Next, we duplicate the

file and rename it to
. Actually, we can give it any name. We will use this name instead of the
command, like
flutterstable --version


Now execute

nano ~/.bash_profile
and add the path of the new version. In my case it looks like this (I added the second row):

export PATH="$PATH:/Users/user/flutter/bin"
export PATH="$PATH:/Users/user/flutter_stable/bin"

Save, exit, and restart the terminal.

Verify if the path is correct with the command

which flutterstable
. It must give something like this:

Now the

flutterstable --version
flutter --version
commands should give different versions.

Visual Studio Code

Every project can use a specific version of Flutter. Open the settings of Visual Studio Code (

) and search 'flutter sdk paths'. Select the 'Dart & Flutter' in the left menu, click 'Add item', and add the paths. In my case the result looks like this:


Restart the Visual Studio Code. Now at the bottom right corner, we can select the flutter version:


As a result, we have two different versions of Flutter and we can use different versions for different projects.


Signup or Login to Join the Discussion


Related Stories