How to Install Flutter on Windows in a Few Steps

September 24, 2023, . open book5 minutes read






This article provides a step-by-step guide on how to install Flutter on Windows.

What is Flutter?

Flutter is an open-source framework for creating mobile applications. Google purchased Flutter, which was released in May 2017. Development is quicker with Flutter because it is Open Source. Flutter makes it simpler for developers to publish their applications by enabling the creation of cross-platform mobile applications.

Sky was the name of the initial iteration of Flutter, which was exclusive to the Android OS. Flutter is developed in the Dart programming language, which already has fundamental classes or functions for creating mobile applications.

Dart is a language that supports object-oriented programming (OOP) and has a C-style syntax that may optionally be altered to JavaScript.

How to Install Flutter on Windows?

Follow the steps below in order to set up flutter in your Windows PC

Prerequisites

To set up and run Flutterin your development environment, it must meet these minimum requirements:

  • Operating Systems: Windows 10 or later (64-bit), x86-64 based.
  • Disk Space: 1.64 GB
  • Windows PowerShell 5.0 or newer
  • Git for Windows 2.x, with the Use Git from the Windows Command Prompt option.

Step 1: Download the latest stable Flutter SDK

Extract and place the flutter folder in the desired directory for example %USERPROFILE%\flutter, D:\dev\flutter).

Do not install Flutter in a path that has spaces or special characters or the C:\Program Files\ which requires admin privileges

Once everything is set you will be able to run Flutter commands in the Flutter console

Step 2: Update your Path

You should update your path so that you can run the Flutter command in any Windows console.

  • From the search bar type “Edit Environment Variables
  • In the windows that open, click on “Environment Variables
  • Then under the User Variable, check for an entry called Path
    • If the path exists, add the full path to your flutter/bin to the existing values separating them with a semi-colon for example C:\Python39\Scripts\;E:\flutter\bin
    • If this entry does not exist, create a new user variable Path and add the full flutter\bin path as its value

Once everything is set, you need to refresh or reopen any existing window console for changes to take effects

Step 3: Run Flutter Doctor

Open your command prompt and run the following command to check whether there are any dependencies you need to install in order to terminate the setup.

flutter doctor

The command checks your environment and displays a report in your console to tell you the status of your Flutter installation.

[-] Android toolchain - develop for Android devices
• Android SDK at D:\Android\sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://docs.flutter.dev/setup/#android-setup for detailed instructions.

Step 4: Set up Android and Install Android Studio

  • Download and install Android Studio.
  • Start the Android setup and work through the Android installation wizard. This will install the latest t Android SDK, Android SDK Command-line Tools, and Android SDK Build Tools, which are required by Flutter when developing for Android
  • Then run flutter doctor to make sure that Flutter has detected the installation of your Android Studio if not run flutter config --android-studio-dir=<directory> to set the Android Studio

Step 5: Set up Your Android Device

To run your Flutter app on an Android device, you need an Android device running Android 5.0 or higher version.

Create a new flutter project in your Android studio. Enable Developer Options and USB Debugging on your device connect your phone to your PC using a USB cable and authorize your PC to access your device

If you wish to use wireless debugging, enable Wireless debugging on your device

Finally, in the the Android studio terminal, run flutter devices to verify that Flutter recognizes the connected Android device.

Note that you can equally run your application in the Android emulator. To do so, enable VM acceleration on your machine and launch Android Studio. Once Android Studio opens, click the Device Manager icon and select Create Device under the virtual tab.

In some versions of Android Studio, you should create a new device via Android Studio > Tools > Android > AVD Manager and select Create Virtual Device. Once in the Create virtual device, choose a device definition and click on Next.

Select one or more system images for the Android version you wish to use and click on Next. Generally, An x86 or x86_64 image is recommended. To enable hardware acceleration, choose Hardware – GLES 2.0 under Emulated Performance. Make sure the AVD setting is accurate, then click Finish.

To run the virtual device, in the Android virtual device manager, click on Run in the toolbar

Step 6: Agree to Android Licenses

To use Flutter, you must agree to the Android license of the Android SDK Platform. Run the following command and review the terms of each license carefully before agreeing to them

flutter doctor --android-licenses

Frequently Asked Questions

How to Set up Flutter on Windows Desktop Development?

For users who have WIndows desktop development, on top of the requisites listed above ,you need to have Visual Studio 2022 or Visual Studio Build Tools 2022. When installing Visual Studio or only the Build Tools, you need the “Desktop development with C++” workload installed for building windows, including all of its default components.


Share on



Author: Learndevtools

Like the article? Please share or subscribe to get more updates from Learndevtools