YouTip LogoYouTip

Flutter Install

Before learning to build Flutter applications, you need to install the Flutter SDK and all required dependencies on your local machine. This section will detail the installation steps on Windows, macOS, and Linux systems. * * * ## System Requirements Before installing Flutter, ensure your development environment meets the following basic requirements: | Requirement | Windows | macOS | Linux | | --- | --- | --- | --- | | Operating System | Windows 10 or higher | macOS 10.14 or higher | Ubuntu 18.04 or higher | | Disk Space | At least 2.8 GB | At least 2.8 GB | At least 2.8 GB | | Tools | Git for Windows | Git (via Xcode) | Git, curl, unzip | * * * ## Windows Installation Steps ### Step 1: Install Git for Windows Git is a version control tool that Flutter needs to manage code and download the SDK. 1. Visit the Git for Windows download page 2. Download the latest version of Git for Windows 3. Run the installer and complete the installation with default settings ### Step 2: Install Visual Studio Code (Recommended) Visual Studio Code (VS Code for short) is our recommended Flutter development editor, providing rich Flutter extension support. 1. Visit the VS Code official website 2. Download and install VS Code 3. Open VS Code after installation is complete ### Step 3: Install Flutter SDK There are two ways to install the Flutter SDK: #### Method 1: Install using VS Code (Recommended) The Flutter extension in VS Code can automatically download and configure the Flutter SDK. 1. Click the Extensions icon on the left side in VS Code (or press Ctrl+Shift+X) 2. Search for "Flutter" and find the "Dart and Flutter extensions" extension 3. Click "Install" to install the extension 4. After installation, press Ctrl+Shift+P to open the Command Palette 5. Type "Flutter: New Project" and select it 6. Select "Download SDK", then choose the installation directory #### Method 2: Manual Download and Installation 1. Visit the Flutter official download page 2. Download the latest Flutter SDK (.zip file) 3. Extract the downloaded file to your preferred directory, such as C:\flutter 4. Add Flutter's bin directory to the system environment variable PATH ## Manual Environment Variable Configuration Steps to configure environment variables on Windows: 1. Right-click "This PC" and select "Properties" 2. Click "Advanced system settings" 3. Click "Environment Variables" 4. Find Path in "System variables" and click "Edit" 5. Click "New" and add the Flutter bin directory path (e.g., C:\flutter\bin) 6. Click OK to save * * * ## macOS Installation Steps ### Step 1: Install Git macOS usually comes with Git pre-installed. You can check with the following command:
$ git --version
If not installed, run the following command:
$ xcode-select --install
After the dialog pops up, click the "Install" button. ### Step 2: Install VS Code Download and install VS Code from the VS Code official website. ### Step 3: Install Flutter SDK Similar to Windows, you can choose to install from VS Code or manually. #### Manual Installation Steps: 1. Download Flutter SDK:
$ git clone https://github.com/flutter/flutter.git -b stable
1. Add Flutter to PATH:
$ echo 'export PATH="$PATH:/Users/your_username/flutter/bin"' >> ~/.zshrc
$ source ~/.zshrc
* * * ## Linux Installation Steps ### Step 1: Install Required Tools On Ubuntu/Debian systems, run the following command to install required tools:
$ sudo apt-get update
$ sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa
### Step 2: Clone Flutter SDK
$ git clone https://github.com/flutter/flutter.git -b stable
### Step 3: Configure PATH
$ echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.bashrc
$ source ~/.bashrc
* * * ## Verify Installation Regardless of which operating system you use to install Flutter, you can verify the installation with the following command:
$ flutter doctor
After running this command, Flutter will check your development environment and report any issues. If the installation is successful, you will see output similar to the following:
Doctor summary (v3.x.x):
[βœ“] Flutter (Channel stable, 3.x.x)
[βœ“] Android toolchain
[βœ“] iOS toolchain
[βœ“] Chrome (for web development)
[βœ“] Windows toolchain
[βœ“] macOS toolchain
[βœ“] Linux toolchain
[βœ“] Web server
When running flutter doctor for the first time, it will download the Dart SDK and perform some initialization operations, which may take a few minutes.
* * * ## Common Problem Solutions ### Flutter command not found If entering the flutter command in the terminal shows not found, please check: * Whether the environment variable PATH is correctly configured * Whether a new terminal window is opened (environment variable changes require a new window to take effect) ### Android Studio not installed warning Running flutter doctor may display a warning that Android Studio is not installed. If you are not developing Android applications, this warning can be ignored. ### Android SDK issues If you need to develop Android applications but encounter SDK issues, you can: 1. Download and install Android Studio 2. Install Android SDK through SDK Manager in Android Studio
← Flutter Project StructureFastapi Sql Database β†’