A Very Good Flutter Setup for Windows

A very good guide to configure your local Windows environment for your Flutter projects

5 min read

Intro ✨

Many exciting updates came out of the Flutter Windows update from last week, most notably that there is now stable support for Windows apps built with Flutter.

We’re sure that this development will make many Flutter developers want to experiment with creating Windows-based versions of their current Flutter apps or target Windows in new projects. In order to do that, we need to configure a new Flutter environment setup.

While Flutter development has been possible on Windows for quite some time, this may be new territory for Flutter developers who regularly use macOS (including our team here at VGV). This blog will guide you through the configuration process.

Note that this is an opinionated guide to configuring your local environment according to our preferences — feel free to use whatever setup works best for you. This guide was written with the assumption of running on the latest Windows 11 release, but based on the version you’re running, some changes may be required.

Set Up ⚙️

Before getting started, be aware this process may be a lengthy one due to the size of some of the installation packages and downloads. For all commands we will be using the “Windows Terminal” which now comes standard with Windows 11 and defaults to “Windows PowerShell” mode.

1 - Chocolatey

While the Mac has Homebrew, the Windows equivalent is Chocolatey. It’s not technically required to get Flutter running on Windows, but it will make things much easier. You can follow the install instructions on their site. One thing to note is that you need to start the Terminal in “administrative mode”. Do this by right clicking on Windows Terminal in the Start menu and select “Run as Administrator.”

Windows Terminal Run as Administrator option in the Start menu

2 - Install the pre-reqs

There are a few things that all need to be downloaded and installed before we start running anything. The good news is that this can all be done with just a few Terminal commands via the choco command which was just installed.

choco install vscodechoco install gitchoco install fvmchoco install visualstudio2022community

3 - Flutter setup via fvm

While you can get Flutter up and running without the use of fvm, it’s a good idea to start using it right away. This will allow you to easily install, revert, and change what version of Flutter you are using.

fvm install stablefvm global

FVM install stable and fvm global commands in Windows Terminal

When setting the global version of Flutter to use, you will be shown the list of all Flutter versions you have installed so far. In this case we want to choose stable. By default, fvm is installed in your user directory. Once it is installed you can easily proxy flutter and dart commands through fvm.

FVM listing installed Flutter versions with stable selected as global

In order to cut down the number of keystrokes we need, we can just can add whatever fvm is pointing to as the global version to our environment. To do this we go to Settings -> System -> About, and then click on “Advanced system settings” in the Device specifications panel. In the window that pops up you can then select “Environment Variables”.

Find the Path variable in the top section of User variables. Double clicking on it will allow you to add a new item to the path. Here is where you add the path to your fvm install.

Remember that this is typically installed in your user directory so we just need to point to the default/bin folder. As we update our version of Flutter via fvm, then the system will automatically update. After this is complete, restart Terminal and you should be able to run flutter —version directly.

Windows Environment Variables dialog with FVM default/bin path added

4 - Visual Studio setup

There are a couple of extra requirements we’ll need to configure in Visual Studio in order to get a Flutter Windows app up in running. While we have the basic install completed back in step two, we need to open up the “Visual Studio Installer” and modify our installation.

Select “Desktop development with C++” from the list and click “Modify”. Note that this package is large and will most likely take a while to get downloaded and installed.

Visual Studio Installer with Desktop development with C++ workload selected

5 - Enable Windows developer mode

If your ‘re already in the Terminal, you can quickly jump to this by entering start ms-settings:developers. Otherwise, you can also get to it via the Settings app under Privacy & Security, and then For Developers. Go ahead and flip the “Developer Mode” switch to on.

Windows Developer Mode toggle enabled in Settings

6 - VS Code setup

With everything installed, we can finally setup VS Code for Flutter development. Search for and install the “Flutter” plugin, and the “Dart” plugin will automatically be installed as well.

VS Code Extensions marketplace with Flutter plugin installed

And with that our environment is setup and ready to go for Windows app development using Flutter! We now can either create a new Flutter app or try and add Windows support to an existing Flutter app.

Create a New Flutter App

With Windows support becoming stable, we no longer need to enable any extra flags or configuration. Just running a simple flutter create app_name_here command will get you the basic Counter app with iOS, Android, web, and Windows support. Simple run the command, open the new project in VS Code, and run the app with “Windows” as the selected device.

Add to Existing Flutter App

This is where things can get tricky. In order to add a Windows target to your current Flutter app, you just need to run a simple command, flutter create —platform=windows. This will do an update in place and create the new targets needed for the builds to happen.

In order to demonstrate this we can easily take a Flutter project from the Flutter Gallery, execute the create command to add the Windows support, and then run the app side by side with another platform like web via Edge.

Flutter Gallery app running side by side on Windows desktop and Edge browser

If you take the extra time to setup Android Studio, we can even get three platforms all running at the same time. Simply updating a few packages allows us to get the slide_puzzle running in Android, Windows, and Web via Edge.

Slide puzzle app running simultaneously on Android, Windows, and Edge

While the Flutter framework has had support for Windows in beta form for a while, the Flutter community may need to catch up. If you have a very robust Flutter based app today it’s possible that not all of the third party packages that you use will be updated to fully support Windows yet. This is a similar thing as we saw last year when Flutter on the web moved to stable, the community needed time to catch up.

We hope this guide helps you expand your apps to Windows, or create new experiences that target the desktop, built using Flutter’s familiar tooling. We’re excited to see what comes next from Flutter as the team continues to make notable progress on supporting multiple platforms!

Frequently Asked Questions

What does this guide cover for Flutter on Windows?

It walks through configuring a local development environment on Windows 11 to build Flutter apps that target Windows desktop, alongside iOS, Android, and web. The setup uses Chocolatey, fvm, Visual Studio 2022, and VS Code with the Flutter and Dart extensions.

Why use Chocolatey and fvm instead of installing Flutter directly?

Chocolatey is the Windows equivalent of Homebrew and makes installing prerequisites a single Terminal command. fvm lets you install, switch, and revert Flutter versions easily, which is especially helpful when working across projects that need different Flutter releases.

Which Visual Studio workload is required for Flutter Windows desktop apps?

Open the Visual Studio Installer, modify the Visual Studio 2022 install, and add the Desktop development with C++ workload. The download is large, so plan for the install to take a while.

How do I add Windows support to an existing Flutter app?

Run flutter create --platforms=windows from the project root. It updates the project in place and creates the new targets needed to build the app on Windows desktop.

Will all my third-party packages work on Windows out of the box?

Not necessarily. When Flutter for Windows reached stable, the community still needed time to catch up. Some packages may not yet support Windows, so check pub.dev compatibility before committing to a Windows target on an existing app.