How to Install Flutter?

Topics Covered

Overview

Flutter is essentially Google's portable user interface (UI) toolkit, which is used to create visually appealing, natively developed apps for mobile, desktop, and web from a single codebase. Flutter is open-source, free, and works with existing programs. It is used by businesses and developers all around the world because of its user-friendly interface and simple, yet effective commands. In this tutorial, we will look at how to install Flutter on Windows.

System Requirements

  • Installed Windows 10 operating system (Flutter will function on Windows 7 SP1 and later versions).
  • At least 1.65 GB of free disc space (if not already installed, more free storage is required for other tools and IDEs).
  • Windows Powershell 5.0 or later is required.
  • Git for Windows 2.0 or later (Optional).
  • Android Studio is already installed.
  • Optional: Visual Studio 2022 with C++.

Installing Flutter on Windows

How to Install Flutter?

After you have met all of the prerequisites, you may begin installing and configuring the Flutter SDK. You will install a fixed installation of Flutter SDK without using Git in today's lesson.

Step - 1: Download Flutter SDK

Go to flutter.dev on your website. Select Docs > Get Started > Install > Windows from the top navigation bar.

Step - 1 Download Flutter SDK on windows

Get the Flutter SDK right away. Click the big blue button labeled flutter windows 1.1x-stable.zip. The zip file download will begin. Flutter now advises that we extract this to a convenient location on the C-Drive.

Step - 2: Extract the Zip Folder

Unzip the zip file to:

Make sure you duplicate the complete path from the snippet above. Because of the heightened rights, extracting it elsewhere may make obtaining access difficult. Flutter is now installed on your system.

Step - 3: Check Flutter Version

Search for cmd prompt to make sure everything you did is working. You should see a dark window with some ominous writing on it. Enter

You'll see something like this.

Step - 3 Check Flutter Version on windows

Installing Flutter on MacOS

You must perform the following steps to install Flutter on MacOS.

Step - 1: Download Flutter SDK

Download the newest Flutter SDK from here. The current version is 1.2.1, and the file is flutter_macos_v1.2.1- stable.zip.

Step - 2: Extract the Zip Folder

Unzip the zip archive into a folder, for example, /path/to/flutter.

Configuring Flutter

For Windows

Step - 1: Change the Path variable

You want to use Flutter on your PC now that it's installed. To begin, type env into your search box. The option "Edit the system environment variables for your account" should be selected. This type of stuff will occur.

Change the Path variable for configuring flutter on windows

After selecting Path, click Edit. If your system does not already have a Path variable, just select Create and call it Path.

Change the Path variable for configuring flutter on windows 1

Now, choose New, then paste the following:

Step - 2: Run Flutter Doctor to Check the Requirements

Flutter provides a tool, flutter doctor, to ensure that all Flutter development requirements are satisfied.

Running the above command will analyze the system and display the resulting report, as seen below.

According to the report, all development tools are available, but the device is not linked. We can resolve this by connecting an Android device via USB or by using an Android emulator.

Step - 3: Report Issues

Install the most recent Android SDK if flutter doctor suggests it. Install the most recent Android Studio if flutter doctor suggests it. Launch an Android emulator or connect a genuine Android smartphone to the system.

Step - 4: Install the Flutter and Dart Android Studio Plugins

It includes a starter template for creating new Flutter applications, as well as the ability to launch and debug Flutter applications directly in Android Studio. Launch Android Studio. Select File>Settings>Plugins. Install the Flutter plugin after selecting it. When prompted to install the Dart plugin, select Yes. Relaunch Android Studio.

For MacOS

Step - 1: Update the Path Variables

Add the flutter bin directory to the system path.

Enable the updated route in the current session using the following command and then validate it.

Step - 2: Report Issues

Flutter provides a tool, flutter doctor, to ensure that all Flutter development requirements are satisfied. It is comparable to its Windows counterpart. If flutter doctor suggests it, install the most recent version of XCode. To design an iOS application, launch the iOS simulator or connect a real iPhone device to the system.

Verifying the Installation

Using the command prompt, we can run flutter doctor on a PC. By clicking on the Windows Start button, we may access the command prompt. Entering command prompt and hitting Return.

Once we've opened the command prompt, we may input the following:

verifying the installation of flutter

The output of the flutter doctor will be shown in the command prompt window. When executed, flutter doctor generates a report on your Flutter setup's health. flutter doctor discovered two errors with our setup in this example.

  • First, we must accept Android licenses. To overcome the issue, we should run flutter doctor --android-licenses.
  • Second, the flutter doctor reports that Xcode is not installed. We can fix this by installing Xcode, performing the required procedures, and installing CocoaPods (a packaging system used in iOS and macOS app development).

verifying the installation of flutter 1

We may not see this result on our device; we may notice different or no problems. Regardless, Flutter Doctor will give instructions for resolving any issues discovered in our setup. After we've resolved our issues, we'll be able to create Flutter apps.

Conclusion

  • In this article, we looked in depth into how to install Flutter?
  • Flutter is a free and open-source UI framework created by Google that was introduced in 2017. It works well with Android and iOS mobile apps, as well as online and desktop apps.
  • To install Flutter on Windows 10, you must have at least 1.65 GB of free disc space, Windows Powershell 5.0 or later, Git for Windows 2.0 or later, Android Studio, and Visual Studio 2022 with C++.
  • The most important details in this text are the steps to get the Flutter SDK and how to install Flutter.
  • The first step is to click the big blue button labeled flutter windows 1.1x-stable.zip and extract the zip file to C:srcflutter.
  • The second step is to check the version of Flutterby typing env into the search box and entering flutter --version.
  • The third step is to use Flutter on your PC by editing the system environment variables for your account and creating a Path variable.
  • The fourth step is to run a flutter doctor to check the requirements.
  • flutter doctor verifies that everything in our Flutter setup is properly installed and configured. When an issue arises, a flutter doctor will provide solutions. When we initially install or upgrade our system, we should run flutter doctor.