Table of contents
supported OS
The following OS can be installed and configured flutter
Install the SDK
windows
To install and run Flutter, your development environment should at least meet the following requirements:
OS: Windows 10 or higher (64-bit x86-64-based OS).
Disk space: In addition to installing the IDE and some tools, you should have at least 1.64 GB.
Settings: Developer mode must be enabled on Windows 10/11.
Tools: For Flutter to work properly in your development environment, it depends on the following tools:
-
Windows PowerShell 5.0 or later (pre-installed in Windows 10)
-
Git for Windows 2.x with the Use Git from Windows command prompt option checked.
Find the corresponding SDK installation for windows
https://docs.flutter.dev/release/archive
You can also directly install the latest stable version
https://docs.flutter.dev/get-started/install/windows
#### Path Environment Settings
Settingsflutter\bin
Since the Flutter 1.19.0 dev version, the Flutter SDK has added the dart command in the same directory as the flutter command script, so you can run the Dart command line program more conveniently. When you download the Flutter SDK, you will also download the corresponding version of the Dart SDK, but if you downloaded the Dart SDK separately, please make sure that the dart in the Flutter SDK ranks first in your environment variables, because the separate SDK may not be compatible with the Flutter SDK . The command below shows if flutter and dart come from the same bin directory and are compatible to use.
where flutter dart
C:\path-to-flutter-sdk\bin\flutter
C:\path-to-flutter-sdk\bin\flutter.bat
C:\path-to-dart-sdk\bin\dart.exe :: this should go after `C:\path-to-flutter-sdk\bin\` commands
C:\path-to-flutter-sdk\bin\dart
C:\path-to-flutter-sdk\bin\dart.bat
As shown above, the dart commands within the Flutter SDK are not at the top.
You need to update PATH to put C:\path-to-flutter-sdk\bin\ before C:\path-to-dart-sdk\bin\ (current scenario). Then restart the command line to make the modification take effect, and run where again, at this time, flutter and dart from the same directory are already in the front.
where flutter dart
C:\dev\src\flutter\bin\flutter
C:\dev\src\flutter\bin\flutter.bat
C:\dev\src\flutter\bin\dart
C:\dev\src\flutter\bin\dart.bat
C:\dev\src\dart-sdk\bin\dart.exe
If you're using PowerShell, where is actually an alias for the Where-Object command, so you actually need to run where.exe.
where.exe flutter dart
After updating the Path variable, open a new console window and execute the following command. If it says that there are any platform-dependent dependencies, then you need to follow the instructions to complete these configurations:
C:\src\flutter>flutter doctor
LINUX
System: Linux (64-bit)
Required space: 600 MB (does not include disk space for IDE/tools).
bash
curl
file
git 2.x
mkdir
rm
unzip
which
xz-utils
zip
and libGLU.so.1
snapd
sudo snap install flutter --classic
flutter sdk-path
manual
Download SDK
https://docs.flutter.dev/get-started/install/linux
cd ~/development
tar xf ~/Downloads/flutter_linux_3.7.11-stable.tar.xz
export PATH="$PATH:`pwd`/flutter/bin"
flutter precache
Run the following command to see if there are any missing dependencies that you need to install to complete the setup (for verbose output, add the -v flag):
flutter doctor
This command will check your environment and display a report in the command window.
The Dart SDK is already bundled with Flutter; you don't need to install Dart separately.
Double check that you still have something to install, or a task to perform (prompted in this text).
IDE
-
VS Code is a lightweight editor that can run and debug Flutter.
-
Install Android Studio
Android Studio provides a complete integrated development environment for Flutter.
Android Studio, 2020.3.1 (Arctic Fox) or later
-
Meanwhile, you can also use IntelliJ:
IntelliJ IDEA Community, version 2021.2 or later
IntelliJ IDEA Ultimate, version 2021.2 or later
Here use IntelliJ IDEA Community
https://www.jetbrains.com/idea/download/
Install the Flutter and Dart plugins
Please refer to the following installation guides for different platforms:
Mac
The installation process is as follows:
Open Android Studio.
Open the plug-in settings (open Preferences > Plugins on systems above v3.6.3.0).
Then select the Flutter plugin and click Install.
When prompted to install the Dart plugin, click Yes.
When prompted to restart, click Restart.
Linux or Windows platform
Refer to the steps described below:
Open the plugin preferences (located in File > Settings > Plugins)
Select Marketplace, select the Flutter plugin and click Install.