This skill guides you through installing the Flutter SDK using git clone and setting up the environment for Web, Mobile, and Desktop development.
Ensure you have the following installed:
Open your terminal and run the following commands to clone the stable branch of the Flutter SDK.
# Create a directory for development (e.g., ~/development)
mkdir -p ~/development
cd ~/development
# Clone the Flutter SDK
git clone https://github.com/flutter/flutter.git -b stable
Open PowerShell or Command Prompt.
# Create a directory for development (e.g., C:\src)
mkdir C:\src
cd C:\src
# Clone the Flutter SDK
git clone https://github.com/flutter/flutter.git -b stable
To run flutter commands from any terminal, you must add the SDK’s bin directory to your PATH.
Open your shell configuration file (e.g., ~/.zshrc, ~/.bashrc, or ~/.zshenv).
Add the following line (replace ~/development/flutter with your actual path):
export PATH="$PATH:$HOME/development/flutter/bin"
Refresh your current terminal:
source ~/.zshrc # or ~/.bashrc
Win + S, type “env”, and select Edit the system environment variables.flutter\bin (e.g., C:\src\flutter\bin).Run the following command to check for missing dependencies:
flutter doctor
flutter config --enable-web
flutter devices to see “Chrome” listed.sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
sudo gem install cocoapods
open -a Simulator.flutter doctor --android-licenses
(Press y to accept all licences).flutter config --enable-macos-desktop
flutter config --enable-windows-desktop
sudo apt-get update
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
flutter config --enable-linux-desktop
Run flutter doctor again to ensure all desired platforms have checkmarks.
flutter doctor -v