Now you can verify if everything works fine by opening command prompt and enter flutterb doctor and it should show the SDK pointing to beta Go to environment variables => user variables => Path => edit=> new e.g I have a batch file named as flutterb.bat to point to the beta channel, so to access the beta SDK I will use flutterb in the command line and not flutter.Īnd finally, we need to add the alias folder to the environment variable in order to make it accessible throughout windows. Name your batch files wisely, because you will be using them from the command line. On windows, I have the flutter SDKs stored in C:/flutter_sdkĪnd then create an Alias folder and create batch files corresponding to each flutter SDK, where each batch file contains the path to flutter SDKĮ.g flutterd.bat contains the path to dev sdk off You can verify this by running doctor -vĮ.g to verify flutterd is pointing to dev run flutterd doctor -v Now you can verify by typing your alias names in the terminal flutterm, flutterd etc and it will respond from the respective sdk. And if the file doesn't exist you may create it. This is the same file where you have added your flutter sdk's path when you first installed it. If you are not sure then typing echo $SHELL in your Terminal tells you which shell you’re using. And lastly, you need to add this in your shell file.(Hit ctrl + x and enter to save and exit) That means when you type flutterd in the terminal then it will use the SDK located at ~/Documents/flutter_dev/bin/flutter and respectively for rest of the aliases.
Note that you can name the aliases as you like. alias flutterd='~/Documents/flutter_dev/bin/flutter'Īlias flutterm='~/Documents/flutter_master/bin/flutter'Īlias flutterb='~/Documents/flutter_beta/bin/flutter' Paste these aliases with the appropriate path in the file. You can do this via terminal by running nano ~/.bash_aliases bash_aliases file inside your $HOME directory To create an alias you need to create.Think of aliases as a shortcut to accessing the SDK via the command line. In order to access the appropriate version of flutter through the terminal, we need to create aliases.
I have different versions of flutter SDKs downloaded in a Documents folder located at $HOME/Documents The below answer will help you setup the different versions of SDK regardless of whether you are on Windows, Linux, or mac. Below you can find the steps to add the path to vscode. This allows you to use multiple versions of the SDK through the command line or the terminal, Just like you use any flutter command, And Incase you want to use these different versions of your SDK in your IDE, you need to add the SDK paths to the settings of your IDE.
How to add another user on windows newest version download#
Firstly you need to download all the flutter SDKs you would want to be able to switch locally and create aliases for it.