#first be sure that snapd install it, if not use following 2 commands:
sudo apt update
sudo apt install snapd
#install flutter
sudo snap install flutter --classic
sudo snap install flutter --classic
sudo snap install flutter-gallery
flutter channel dev
flutter upgrade
flutter config --enable-linux-desktop