Flutter Setup and Installation
Before you write any Flutter code, you need to install three things: the Flutter SDK, a code editor, and device emulators. This topic walks through each step clearly.
What You Need Before Installing
- A computer running Windows, macOS, or Linux
- At least 10 GB of free disk space
- An internet connection for downloads
To build iOS apps, you need a Mac with Xcode installed. Windows and Linux work for Android apps.
Step 1 — Install Flutter SDK
The Flutter SDK is the core toolset. It includes the Dart language, Flutter libraries, and command-line tools.
Flutter SDK Download Steps: ────────────────────────────────── 1. Go to flutter.dev/docs/get-started/install 2. Choose your operating system 3. Download the zip file 4. Extract it to a folder (e.g., C:\flutter on Windows) 5. Add Flutter to your system PATH
Adding Flutter to PATH (Windows Example)
Adding Flutter to PATH means your computer can find the flutter command from any folder.
- Open System Properties → Advanced → Environment Variables
- Under "User variables", find Path and click Edit
- Click New and paste the path to your
flutter\binfolder - Click OK and restart your terminal
Verify the Installation
Open a terminal or command prompt and type:
flutter --version
You should see a version number like Flutter 3.x.x. If you see an error, the PATH was not set correctly.
Step 2 — Install a Code Editor
The recommended editor is Visual Studio Code (VS Code). It is free, lightweight, and has excellent Flutter support.
VS Code Setup: ────────────────────────────────── 1. Download from code.visualstudio.com 2. Install the Flutter extension (by Dart Code) 3. Install the Dart extension (usually auto-installed)
The Flutter extension gives you code completion, error highlighting, and a "Run" button to launch your app directly from VS Code.
Alternative: Android Studio
Android Studio is Google's official IDE. It includes a built-in Android emulator and deep Flutter integration. It uses more memory than VS Code but is a solid choice for Android-focused work.
Step 3 — Install Android Studio and Set Up an Emulator
Even if you use VS Code as your editor, you need Android Studio to get the Android emulator (a virtual phone on your computer).
- Download Android Studio from developer.android.com/studio
- Run the installer and accept all defaults
- Open Android Studio → More Actions → Virtual Device Manager
- Click "Create Device" and select a phone model (e.g., Pixel 6)
- Download a system image (Android 13 or later recommended)
- Click Finish and then press the Play button to start the emulator
Step 4 — Run Flutter Doctor
flutter doctor is a built-in command that checks your setup and tells you what is missing.
Run in terminal: ───────────────── flutter doctor Sample output: ───────────────────────────────────────────── [✓] Flutter (Channel stable, 3.x.x) [✓] Android toolchain [✗] Xcode — not installed (macOS only for iOS) [✓] VS Code (version 1.x.x) [✓] Connected device (1 available)
Fix any items marked with [✗] before continuing. Items marked [✓] are ready.
Step 5 — Create and Run Your First Flutter Project
Open your terminal and type the following commands:
flutter create my_first_app cd my_first_app flutter run
Flutter creates a sample counter app. Your emulator or connected device launches and shows the app running. You just confirmed your setup works.
Setup Summary Diagram
[Flutter SDK] ──┐
│
[VS Code] ─────┼──► Working Flutter Dev Environment
│
[Android ────┘
Studio +
Emulator]
Common Setup Problems and Fixes
| Problem | Fix |
|---|---|
flutter command not found | Check that flutter/bin is in your PATH |
| Emulator does not start | Enable virtualization (Intel HAXM) in BIOS |
| Android license not accepted | Run flutter doctor --android-licenses |
| Dart SDK missing | It ships with Flutter — reinstall the SDK |
