Flutter Installation Guide
Requirements
Before installing Flutter, ensure your development environment meets the following requirements. For operating systems, Flutter supports Windows, macOS, and Linux. Windows requires Windows 10 or higher, macOS requires macOS 10.14 or higher, and Linux requires a desktop environment supporting GNOME or KDE.
For disk space, the Flutter SDK itself occupies about 1GB, but considering development projects and build cache, it's recommended to reserve at least 10GB of available space. For memory, 8GB or more provides a smoother development experience.
For mobile development, iOS development requires macOS and Xcode, Android development requires Android Studio and Android SDK. Web and desktop development have no special requirements, just installing the Flutter SDK is sufficient.
Installation Steps
Windows Installation
There are two main ways to install Flutter on Windows. The first is to download the pre-compiled archive from the Flutter website, extract it to an appropriate location, then add the flutter/bin directory to the system PATH environment variable.
Download method: Visit the Flutter website flutter.dev and download the latest stable version archive. Extract to C: \src\flutter or another suitable location. Open System Properties → Advanced → Environment Variables, and in User variables Path, add the Flutter bin directory path.
After completion, open Command Prompt and run the flutter doctor command to check if the installation was successful. Flutter doctor will check the Flutter SDK status and give configuration suggestions.
macOS Installation
On macOS, Git-based installation is recommended. First ensure Xcode is installed, then open Terminal and execute the following to clone Flutter:
git clone https://github.com/flutter/flutter.git -b stable
Add Flutter to PATH:
echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.bash_profile
For zsh users:
echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.zshrc
Then execute source ~/.bash_profile or source ~/.zshrc to refresh environment variables.
Linux Installation
Linux installation is similar to macOS. First install dependencies:
sudo apt-get update
sudo apt-get install curl git unzip xz-utils zip libglu1-mesa clang cmake ninja-build pkg-config libgtk-3-dev
Then clone the Flutter repository and configure PATH, same as macOS steps.
Verify Installation
After installation, run the following commands to verify:
flutter --version
flutter doctor
Flutter doctor will show the installation status and any missing dependencies. Complete necessary configurations according to the prompts, such as installing Android Studio and configuring Android SDK.
IDE Configuration
VS Code
VS Code is one of Flutter's recommended editors. After installing VS Code, open the extensions marketplace, search for Flutter and Dart extensions and install them. After installation, restart VS Code to use Flutter-related features.
Android Studio
After installing Android Studio, open the Plugins page, search for the Flutter plugin and install it. After installation, configure the Flutter SDK path: Open Preferences → Language & Frameworks → Flutter and set the Flutter SDK path.
Quick Start
Create your first Flutter project:
flutter create my_first_app
cd my_first_app
flutter run
Or use the command palette (Ctrl+Shift+P) in VS Code and enter Flutter: New Project to create a new project.
Run flutter devices to view connected devices, and flutter run -d device_id to run on a specific device.
