📒 

Flutter is a popular open-source UI toolkit from Google used to build natively compiled applications for mobile, web, and desktop from a single codebase. If you’re looking to start developing Flutter apps on Windows, this guide will walk you through the process in just six simple steps.

Prerequisites

Before we begin, make sure your system meets the following requirements:

  • Operating System: Windows 10 or later (64-bit)
  • Disk Space: At least 1.64 GB of free space (excluding space for IDE/tools).
  • Tools: Git for Windows to clone Flutter repository.

Let’s get started!

Step 1: Download the Flutter SDK

The first step is to download the Flutter SDK:

  1. Go to the official Flutter website: https://flutter.dev/docs/get-started/install.
  2. Scroll down to the Windows section.
  3. Click the “Download Flutter SDK” button to download the latest stable release as a .zip file.

Once downloaded, extract the .zip file to a directory on your system where you want to store Flutter (e.g., C:\flutter).

Note: Make sure the path to the SDK doesn’t contain any spaces, as this can cause issues during installation.

Step 2: Add Flutter to the System Path

Next, you need to add the flutter command to your system’s PATH so it can be run from the command line.

  1. Press Windows Key + R, type sysdm.cpl and hit Enter.
  2. In the System Properties window, click the Advanced tab, then Environment Variables.
  3. Under User Variables, find the Path variable and click Edit.
  4. In the Edit Environment Variable window, click New and add the path to the Flutter SDK’s bin folder (e.g., C:\flutter\bin).
  5. Click OK to save and exit all dialog boxes.

To confirm the Flutter command works, open a new command prompt and run:

flutter --version

If installed correctly, it should display the Flutter version and other details.

Step 3: Install Git for Windows

Flutter requires Git for version control and to manage dependencies. If you don’t already have Git installed, follow these steps:

  1. Visit the Git for Windows website: https://gitforwindows.org/.
  2. Download and install Git using the default settings.
  3. During installation, make sure that the Git from the command line option is selected so it integrates with the terminal.

After installation, verify Git is installed by running the following command in a new terminal:

git --version

Step 4: Run flutter doctor

Once Git and Flutter are installed, use the flutter doctor command to check for dependencies and diagnose potential issues. Run this command in the terminal:

flutter doctor

This command checks your environment and displays a report of required tools like the Dart SDK, Android Studio, or Visual Studio. The output will look something like this:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ Android SDK is missing command line tools
; download from https://developer.android.com/studio
[!] Xcode - develop for iOS and macOS (Xcode 12.5)
✗ Xcode not installed
; this is necessary for iOS development.

You may see warnings about missing dependencies like Android Studio, which we’ll address in the next steps.

Step 5: Install Android Studio and Configure SDK

To develop and run Android apps using Flutter, you need to install Android Studio and configure the Android SDK:

  1. Download Android Studio from https://developer.android.com/studio.
  2. Install Android Studio, making sure to include the Android SDK and Android SDK Command-line Tools during installation.
  3. After installation, open Android Studio, go to File > Settings > Appearance & Behavior > System Settings > Android SDK, and verify that the SDK is installed.

Once installed, you also need to accept the Android licenses. Open a new terminal and run:

flutter doctor --android-licenses

Follow the prompts to accept all licenses.

Step 6: Install an IDE (Optional)

Although not required, you’ll likely want an IDE to develop Flutter apps efficiently. Two popular options are Android Studio and Visual Studio Code (VS Code). Flutter integrates well with both.

  • Android Studio:
    • Open Android Studio.
    • Go to Plugins (under File > Settings > Plugins) and search for “Flutter”.
    • Install the Flutter plugin along with the Dart plugin, which is necessary for Flutter development.
  • Visual Studio Code:
    • Download and install VS Code from https://code.visualstudio.com/.
    • Open VS Code and go to the Extensions tab (Ctrl+Shift+X).
    • Search for “Flutter” and install the Flutter and Dart extensions.

Conclusion

Congratulations! You’ve successfully installed Flutter on your Windows machine. You’re now ready to start building mobile, desktop, or web applications with Flutter.

To create a new Flutter project, simply run:

flutter create my_first_app

Change into the project directory:

cd my_first_app

And run the app using:

flutter run

This will launch the app on your connected emulator or physical device. Happy coding!