Install Flutter On Windows: Flutter Setup Guide Windows

Haris Bin Nasir Avatar

·

·

Setting up Flutter on your Windows machine is essential for developing cross-platform mobile applications. In this guide, we will take you through the complete process of installing Flutter, setting up supporting tools like Android Studio, and configuring your development environment efficiently. Follow these steps to ensure your setup is ready for Flutter development.

If you prefer watching a video tutorial on installing and setting up flutter on windows here is a link to that.

Prerequisites for Installing Flutter

Before you begin, ensure you have either Windows 10 or Windows 11 installed. Additionally, we’ll use Chocolatey as a package manager to streamline the installation process, along with Git, Android Studio, and an Integrated Development Environment (IDE) like Visual Studio Code.

Step 1: Installing Chocolatey

The first step is to install Chocolatey, a package manager that simplifies the installation of tools required for Flutter. Follow these steps to install it:

  • Go to Chocolatey.
  • Open PowerShell as an administrator by typing “PowerShell” in the Windows search bar, right-clicking, and selecting “Run as administrator.”
  • Copy the command provided on the Chocolatey installation page:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
  • Paste it into PowerShell and press Enter to install Chocolatey.

Step 2: Installing Git

After installing Chocolatey, you need to install Git. Git is necessary for managing version control and collaborating on Flutter projects.

  • In PowerShell, type the following command:
choco install git
  • Follow the prompts to complete the installation.

Git is now installed and ready to be used with Flutter.

Step 3: Downloading Flutter SDK

Next, download and install the Flutter SDK from the official Flutter website. Follow these steps:

  1. Visit the Flutter SDK download page.
  2. Click on “Flutter for Windows.”
  3. Download the ZIP file and extract it.
  4. Move the extracted folder to your preferred location (such as the C:\ drive).

Step 4: Configuring System Path

To ensure Flutter commands can be run globally, you need to add Flutter to your system’s path:

  1. Open the Environment Variables settings by typing “EnV” in the search bar and selecting “Edit the system environment variables.”
  2. Under the Advanced tab, click Environment Variables.
  3. In the System variables section, select Path and click Edit.
  4. Click New, then paste the path to the Flutter bin folder (e.g., C:\flutter\bin).
  5. Click OK to save changes.

After this, Flutter will be available in the command line.

Step 5: Installing Android Studio

Now, install Android Studio, which provides the Android SDK necessary for building Android apps with Flutter. Follow these steps:

  1. Download Android Studio and install it.
  2. During the installation, ensure you install the Android Virtual Device (AVD) as this is needed for running Android emulators.
  3. After installation, open Android Studio and select Standard for the setup type.
  4. Select the Dracula theme (or your preferred theme) and download the required components.

Once installed, you’ll need to accept the Android SDK licenses by running the following command in PowerShell:

flutter doctor --android-licenses

Follow the prompts to accept all the licenses.

Step 6: Setting Up Visual Studio Code

While Android Studio provides a complete development environment, many developers prefer Visual Studio Code for its simplicity. Here’s how to set it up:

  1. Download Visual Studio Code and install it.
  2. Open Visual Studio Code and go to the Extensions tab (Ctrl+Shift+X).
  3. Search for Flutter and install the official Flutter extension.

With Visual Studio Code set up, you can now open your Flutter projects and start development.

Step 7: Verifying Flutter Installation

Once all tools are installed, verify the Flutter setup by running the following command in PowerShell:

flutter doctor

This command checks the Flutter installation and lists any issues that need fixing. Ensure that Flutter, Android Studio, and other dependencies are installed and configured correctly.

Resources:



Conclusion

By following these steps, you should now have Flutter installed and fully set up on your Windows machine. You can start developing Flutter apps with all the necessary tools, including Android Studio, Git, and Visual Studio Code. Ensure that everything is working correctly by running flutter doctor regularly.

Happy Coding…!!!

Leave a Reply

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