Installing Flutter in Windows

Installing Flutter in Windows

What is Flutter?

Flutter is an open source framework made by Google. It enables a developer to create native cross-platform apps from a single codebase. This means that you can develop Android, iOS, Web, and Desktop apps at the same time in a single codebase. Flutter is mainly used for developing mobile apps but its use can be extended to developing web and desktop apps.

Flutter Installation

Install Flutter

  1. Download the Flutter SDK from the installation page.

2. Extract the files to your Documents folder; it should be located in C:\Users\YourUsername\Documents.

Update your Path

  1. Open your search bar and type env. Click on Edit environment variables for your account. Under User variables check if there is an entry called Path.
  2. Click on Path, then click on Edit.
  3. Click on New and add the following to your Path:
C:\Users\ReplaceThisWithYourUsername\Documents\flutter\bin

Verifying the Configuration

We have to make sure that Flutter has been configured correctly.

Open a new terminal and run flutter doctor. *Make sure that you opened a new terminal.

If the command successfully runs, it will look similar to this:

Android Setup

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android.
  3. Run flutter doctor to confirm that Flutter has located your installation of Android Studio. If Flutter cannot locate it, run flutter config --android-studio-dir <directory> to set the directory that Android Studio is installed to.

Android Virtual Emulator Setup

I highly recommend following the Video Version for this part

  1. Enable VM acceleration on your machine.
  2. Launch Android Studio, click on More Actions > Virtual Device Manager > Create Virtual Device > Pixel 3a > Next > Next > Finish

For details on the above steps, see Managing AVDs.

Agree to Android Licenses

  1. Run flutter doctor --android-licenses to agree to the licenses
  2. Type y for every license agreement that shows up
  3. If it shows an error, you have to install the android sdk command line tools
  4. Open Android Studio, click on More Actions > SDK Manager > SDK Tools and click on the command-line tools checkbox.
  5. Click Apply and wait for it to install.

VS Code Setup

  1. Download and install VS Code
  2. Once it is opened, open the extensions tab and install the Flutter extension
  3. Open the Command Palette by pressing Ctrl + Shift + P.
  4. Type new project and select Flutter: New Project
  5. Select Application and type any project name
  6. Select a folder to create the project in and you're ready to go!