
Get the Flutter SDK
If you don’t have snapd, you can install flutter using the following steps:
1. Download the following installation bundle to get the latest stable release of the Flutter SDK:
2. Extract the zip file and place the contained flutter
in the desired installation location for the Flutter SDK (for example, C:\Users\<your-user-name>\Documents
)
cd ~/development
unzip ~/Downloads/flutter_macos_2.8.1-stable.zip
3. If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the Flutter repo on GitHub, and change branches or tags as needed. For example:
C:\src>git clone https://github.com/flutter/flutter.git -b stable
You are now ready to run Flutter commands in the flutter console!
Update your path
If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH
environment variable:
- From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
- Under User variables check if there is an entry called Path:
- If the entry exists, append the full path to
flutter\bin
using;
as a separator from existing values. - If the entry doesn’t exist, create a new user variable named
Path
with the full path toflutter\bin
as its value.
- If the entry exists, append the full path to
You have to close and reopen any existing console windows for these changes to take effect.
Run flutter doctor
From a console window containing Flutter directory in the path, run the following command to see if there are any platform dependencies you need to complete the setup:
flutter doctor
Set up the Android simulator
- Enable Developer options and USB debugging on your device. Detailed instructions are available in the Android documentation.
- Windows-only: Install the Google USB Driver.
- Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
- In the terminal, run the
flutter devices
command to verify that Flutter recognizes your connected Android device. By default, Flutter uses the version of the Android SDK where youradb
tool is based. If you want Flutter to use a different installation of the Android SDK, you must set theANDROID_SDK_ROOT
environment variable to that installation directory.
Set up the Android emulator
- Enable VM acceleration on your machine.
- Launch Android Studio, click the AVD Manager icon, and select Create Virtual Device…
- In older versions of Android Studio, you should instead launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device…. (The Android submenu is only present when inside an Android project.)
- If you do not have a project open, you can choose Configure > AVD Manager and select Create Virtual Device…
- Choose a device definition and select Next.
- Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.
- Under Emulated Performance, select Hardware – GLES 2.0 to enable hardware acceleration.
Verify the AVD configuration is correct, and select Finish.
For details on the above steps, see Managing AVDs.
- In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.
Windows setup
Additional Windows requirements
For Windows desktop development, you need the following in addition to the Flutter SDK:
- Visual Studio 2022 for Flutter 2.9 beta and newer, Visual Studio 2019 for Flutter 2.8.1 and older. Note, Visual Studio is different to Visual Studio Code. For Win32 you need the “Desktop development with C++” workload installed, including all of its default components. For UWP you need the “Universal Windows Platform development” workload installed, with the optional UWP C++ tools.
Enable Desktop Support
Perform the following command to enable desktop support at the command line:
flutter config --enable-windows-desktop
For Windows UWP desktop support perform the following commands to switch to the master
channel, upgrade Flutter, and enable UWP.
flutter channel master
flutter upgrade
flutter config --enable-windows-uwp-desktop
Install the Flutter and Dart plugins
For Windows
Use the following instructions for Linux or WIndows:
- Open plugin preferences (File > Settings > Plugins).
- Select Marketplace, select the Flutter plugin and click Install.