I am using Ubuntu 20.04. I installed fvm and flutter. When I installed 2 versions of Flutter SDK(stable and 1.22.0), they were installed smoothly. Then I set the stable version as global. However, it showed me this warning when I did so:
Flutter "stable" has been set as global However your "flutter" path current points to:
/snap/bin
to use global Flutter SDK through FVM you should change it to:
/home/khamidjon/fvm/default/bin
A bit late to answer. I am using MacOS. In order any terminal to understand where the Flutter SDK located at, I needed to make some configurations. So, for using FVM (Flutter Version Manager) I needed to adjust them again.
Don't worry since there are too much steps. I've just wanted to write them as clearly as possible. It is pretty simple. Here is how I've done it:
Open a new terminal.
Go to the upmost directory by using command: cd
Type ls -la
to list all the files and directories.
You should see this file named exactly: .bashrc
If you can't you should see another one: .zshrc
Open this file using vim (it's an editor. You can research about it but for now, we keep things simple)
So type:
vim .bashrc
Actually, it is a built-in editor. It works a bit differently. You need some basic commands.
Press i key to change into INSERT mode of vim editor.
Now, you can type or delete text. You should make the corresponding changes. So make sure this line exist. (You can comment out other lines that by #
).
I had the Flutter SDK like that before:
export PATH=$PATH:"/Users/your-username-here/another-folder-maybe/flutter/bin"
So I commented that line out and inserted this:
export PATH=$PATH:"/Users/your-username-here/fvm/default/bin"
Now, you should quit the INSERT mode. For that, I use "Control + C" keybinding on Mac. It might be different for you, check that out on the internet.
Then, let's save the changes and quit vim editor by typing exactly
:wq