$ git clone https://github.com/flutter/flutter.git -b stable
# add to .bashrc
export PATH="$PATH:/path/to/flutter/bin"
$ flutter doctor
#ubuntu:
sudo snap install flutter --classic
sudo snap install flutter --classic
Then run the following command,
flutter sdk-path