How to install Flutter on Windows 10 and Setup Flutter Windows Desktop

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, desktop, and embedded devices from a single codebase. This guide will show us how to correctly set up our Windows PC so that we may run a Windows desktop application.

  1. Install Git for Windows

2. Install Flutter via Git with dynamic version. Open Windows Powershell and type:

git clone https://github.com/flutter/flutter.git -b stable

3. Adding the System Environment Variables and Flutter Doctor.

Copy the address of the bin folder of Flutter
Search for Environment Variables and open it
Open Path, paste the bin folder address
Restart Powershell then execute flutter command
After flutter has initialized, run flutter doctor

4. Install Android Studio

Setup Android Studio
After setup, install flutter plugin
After installation, click Restart IDE

5. Configure Flutter Windows Desktop. Open Windows Powershell and type:

flutter

Switch to flutter channel ‘master’:

flutter channel master

upgrade:

flutter config

Currently, there are no configurations set. At the command line, perform the following command to enable Win32 desktop support:

flutter config --enable-windows-desktop

If we run flutter config once more, we should see this:

After that, execute flutter doctor once more to download all necessary packages. As you can see, we encounter multiple issues:

1st issue: cmdline-tools components is missing

Go to Android Studio, click More Actions, then click SDK Manager
Go to Android SDK, click SDK Tools, and check Android SDK Command-line Tools (latest)

2nd issue: Android license status unknown

In Windows powershell, run:

flutter doctor --android-licenses

and then accept all licenses.

3rd issue: Visual Studio – develop for Windows

Install Desktop development with C++

6. Run flutter doctor one last time to check if there are still issues.

Leave a Comment

Your email address will not be published. Required fields are marked *