EthicsComputerCourses
Join training +91 90532 10052

Install Flutter & Set Up

Flutter & Dart · Lesson 12 of 29 Intermediate 8 min read Updated

Before you can build Flutter apps you need three things: the Flutter SDK (which includes Dart), an editor with Flutter support, and at least one device to run apps on, such as an Android emulator, a real phone or the Chrome browser. This lesson walks through the setup on Windows, the most common choice for students in India, and notes what changes on macOS and Linux.

Setting up takes some time and a few gigabytes of downloads, so use a good internet connection. You only do it once.

What you need

ItemWhyNotes
Git for WindowsThe Flutter SDK is downloaded and updated with GitFree, from git-scm.com
VS Code or Android StudioEditor with Flutter and Dart pluginsVS Code is lighter; Android Studio includes Android tools
Flutter SDKThe flutter and dart commands, framework and engineIncludes the Dart SDK
Android Studio + Android SDKNeeded to build Android apps and run the emulatorEven if you code in VS Code
A Mac with XcodeNeeded only to build iOS appsiOS apps cannot be built on Windows or Linux

The Android emulator needs a lot of memory and processor power. If your laptop is slow, use a real Android phone over USB instead; it puts far less load on the computer.

The official guide recommends letting the VS Code Flutter extension download the SDK for you:

  1. Install Git for Windows and Visual Studio Code.
  2. In VS Code, open the Extensions view (Ctrl+Shift+X), search for Flutter and click Install. The Dart extension is installed with it.
  3. Open the Command Palette (Ctrl+Shift+P), type flutter and choose Flutter: New Project.
  4. When VS Code asks where the Flutter SDK is, choose Download SDK and pick a folder, for example C:\dev. Avoid folders that need administrator rights, such as C:\Program Files, and avoid paths with spaces.
  5. When the download finishes, click Add SDK to PATH.
  6. Close and reopen VS Code and any terminals so they see the new PATH.

PATH is the list of folders where your system looks for commands. After step 5, typing flutter in any terminal works.

You can also install by hand: download the stable SDK archive for your system from the Flutter website, extract it to a folder such as C:\dev\flutter, and add C:\dev\flutter\bin to your user PATH in Windows settings. On macOS and Linux the steps are the same idea, with the archive extracted under your home folder.

Step 2: set up Android tools

Install Android Studio from the Android developer website, open it once, and then:

  1. Open More Actions > SDK Manager (or Tools > SDK Manager inside a project).
  2. On the SDK Platforms tab, install a recent Android platform (the official guide currently asks for API level 36).
  3. On the SDK Tools tab, make sure these are installed: Android SDK Build-Tools, Android SDK Command-line Tools, Android Emulator, Android SDK Platform-Tools, CMake and NDK (Side by side).
  4. Accept the Android licences from a terminal:
Terminal
flutter doctor --android-licenses

Type y for each licence. At the end you should see All SDK package licenses accepted.

Step 3: check everything with flutter doctor

flutter doctor checks your installation and tells you what is missing. Run it after every setup step:

Terminal
flutter doctor
Output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.47.6, on Microsoft Windows [Version 10.0.26300.9711], locale en-IN)
[√] Windows Version (Windows 11 or higher, 26H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
    X Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[√] Connected device (3 available)
[√] Network resources

! Doctor found issues in 1 category.

This is a real run on a Windows laptop. Read it line by line: a tick means ready, [X] or [!] means something is missing. Here only Visual Studio is missing, which is needed only to build Windows desktop apps. If you are building for Android, you can safely ignore it. Fix the lines for the platforms you actually target, then run flutter doctor again. flutter doctor -v shows full details, including install paths.

Step 4: a device to run on

You have three options:

  • Android emulator: in Android Studio, open More Actions > Virtual Device Manager, click Create Virtual Device, choose a phone such as a Pixel, download a system image and finish. Turn on hardware acceleration (virtualisation in your BIOS/Windows settings) or the emulator will be very slow.
  • A real Android phone: on the phone, open Settings, tap Build number seven times to unlock Developer options, then turn on USB debugging. Connect the phone with a USB cable and accept the "Allow USB debugging?" prompt.
  • Chrome: web apps need no extra setup, which makes Chrome handy for quick experiments.

List what Flutter can see:

Terminal
flutter emulators          # emulators you have created
flutter emulators --launch <emulator_id>
flutter devices            # running emulators, phones, Chrome, desktop

Step 5: create and run your first app

From a terminal (or with Flutter: New Project in VS Code):

Terminal
flutter create --org in.yourname first_app
cd first_app
flutter run

flutter create generates a complete counter app. --org sets the reverse-domain prefix used for the Android package name and the iOS bundle identifier, so this app becomes in.yourname.first_app. Choose your org carefully: once an app is published, this ID cannot change. If several devices are connected, flutter run asks which one to use, or you can pass -d chrome or a device id.

The app opens with a light purple top bar titled "Flutter Demo Home Page", the text "You have pushed the button this many times:" with a large 0 below it, and a round + button at the bottom right. Each tap increases the number. Now open lib/main.dart, change Colors.deepPurple to Colors.teal, and save: hot reload repaints the app in teal and the counter keeps its value.

iOS and macOS notes

To build for iPhone, you need a Mac with Xcode installed from the App Store, and you follow the iOS setup page on docs.flutter.dev. You can write Flutter code on Windows and later build the iOS version on a Mac, or use a cloud build service. Linux users install the same Android tools; the Flutter website lists the extra Linux packages needed for Linux desktop apps.

Common mistakes

  • Not restarting the terminal after changing PATH, so flutter is "not recognized".
  • Installing the SDK in C:\Program Files, where updates fail because of permissions.
  • Ignoring flutter doctor. It tells you exactly which licence or tool is missing.
  • A very slow emulator because virtualisation is switched off. Enable it, or use a real phone.

Key points

  • You need Git, an editor (VS Code or Android Studio), the Flutter SDK and a device.
  • The VS Code Flutter extension can download the SDK and add it to PATH for you.
  • Android builds need Android Studio's SDK tools and accepted licences (flutter doctor --android-licenses).
  • flutter doctor reports what is ready and what is missing; fix only the platforms you target.
  • flutter create --org ... makes a project and flutter run starts it with hot reload.
  • iOS apps can only be built on a Mac with Xcode.

Exercise

Install Flutter and run flutter doctor. Write down which lines show a tick and which show a problem, and decide which problems matter for building Android apps. Then create an app called hello_india with your own org, run it on an emulator, a phone or Chrome, and change the seed colour in lib/main.dart to Colors.orange. Write the three terminal commands you used.

Show solution
Terminal
flutter doctor
flutter create --org in.meera hello_india
cd hello_india
flutter run -d chrome

For Android work, the lines that must show a tick are Flutter, Android toolchain and Connected device; a missing Visual Studio only matters for Windows desktop apps. After changing Colors.deepPurple to Colors.orange and saving, hot reload repaints the app in orange without restarting it.

Quick Quiz

1. Which command checks your Flutter installation and lists missing tools?

2. flutter doctor shows [X] Visual Studio. You only build Android apps. What should you do?

3. What do you need to build an iOS app?

4. What does --org in.yourname in flutter create set?

Learn Flutter & Dart with a mentor

Free lessons get you started. Our Mobile App Development training adds real projects and code reviews from working developers.

  • Project-based learning
  • Mentor code reviews
  • Free counselling call