How to Install Flutter in Ubuntu (WITHOUT SNAP)

Many times when we are looking for a tutorial to install Flutter on Ubuntu, will be directed to use snapd. Just by executing one command, then Flutter will be installed and ready to use. Snap or snapd is very helpful for install some package or application.
Something easy is not necessarily the best
Yup, even by using snapd can make it easy for users, but I don’t recommend to make snapd as primary for install some package or application (in another article, I will tell you the reason).
Tutorial
1. Download Flutter SDK
Visit this link, to get the latest Flutter SDK. You can choose from Stable, Beta or Dev Channel, but I recommend download from Stable Channel to get stable version.
2. Extract it
You can using any application to extract it, or you can using TAR CLI (an archiving utility) like this :
tar xf flutter_linux_2.5.3-stable.tar.xz
After extracted, you will see flutter
folder.
3. Move flutter folder to lib folder
Actually you can save the flutter folder anywhere, but I think, it will be more structured when we save it in to lib folder.
sudo mv flutter /usr/lib
Check the flutter folder has moved to lib folder or not using ls
ls -l /usr/lib | grep flutter
Flutter folder will showing like this, if moved successfully

4. Try run flutter
Now, you can run flutter with call flutter file on folder /usr/lib/flutter/bin
/usr/lib/flutter/bin/flutter

If you get some error regarding permission, you can change ownership of flutter folder using chown
sudo chown -R $(whoami) /usr/lib/flutter
whoami
will return your username-R
make recursive operation
If you have any error when try to run flutter, leave in the comment for detail of the error, perhaps we all can help you together
5. Add PATH of /flutter/bin folder
It will be very inconvenient when we want to run flutter we have to type /usr/lib/flutter/bin/flutter
. So, we can make it more simple with add PATH of flutter folder to your bash config file.
Usually, the config file of bash have name .bashrc
, so you can add to it, or if their any file with name .profile
you can also add to it.
You can add PATH using echo
, like this :
echo "export PATH=$PATH:/usr/lib/flutter/bin" >> ~/.bashrc
source ~/.bashrc
Or
echo "export PATH=$PATH:/usr/lib/flutter/bin" >> ~/.profile
source ~/.profile
You can check with type flutter
in anywhere, and it will be showing the result same as before.
Conclusion
We have successfully installed Flutter without Snap, and also set path for flutter, so we can using flutter only typing flutter
anywhere. I hope my explanation is easy to understand, and useful for many people.