Installation & Setup
Before you can build anything with Flutter, you need the Flutter SDK on your machine along with a working toolchain for at least one target platform (Android and/or iOS), plus an editor with Flutter/Dart support. This page walks through the whole setup from a clean machine to a running "Hello World" app, and explains what each tool actually does so the process doesn't feel like a black box.
1. Downloading and Installing the Flutter SDK
The Flutter SDK is a folder containing the flutter command-line tool, the Dart SDK
(Dart ships bundled inside Flutter, so you don't install it separately), and the core framework
source. Download the SDK archive for your operating system from the official Flutter site, then
extract it somewhere permanent — avoid paths that require elevated privileges to write to, such
as C:\Program Files on Windows.
// Example extraction location on each OS
// Windows: C:\src\flutter
// macOS: ~/development/flutter
// Linux: ~/development/flutter
Once extracted, the flutter executable lives inside the SDK's bin
folder. You must add that bin folder to your system's PATH so the
flutter command works from any terminal, in any directory.
// macOS/Linux: add this line to ~/.bashrc, ~/.zshrc, or similar
export PATH="$PATH:$HOME/development/flutter/bin"
// Windows: add the folder to the PATH environment variable via
// System Properties -> Environment Variables -> Path -> New
// e.g. C:\src\flutter\bin
Close and reopen your terminal after editing PATH, then confirm it worked:
flutter --version
2. Running flutter doctor
flutter doctor is the single most useful command when setting up your environment.
It inspects your machine and reports exactly what's missing, so you don't have to guess.
flutter doctor
Here's what it actually checks:
| Check | What it verifies |
|---|---|
| Flutter SDK | That the SDK itself is correctly installed and up to date on the current channel |
| Android toolchain | Android SDK, command-line tools, and that licenses have been accepted (flutter doctor --android-licenses) |
| Xcode (macOS only) | Xcode and CocoaPods, required for building and running iOS apps |
| Connected devices | Any emulator, simulator, or physical device currently reachable |
| IDE plugins | Whether it detects the Flutter/Dart plugin installed in VS Code and/or Android Studio |
flutter doctor to show some unchecked items (shown with an "!" or "✗") the first time you run it — for example, if you only plan to target Android, an Xcode warning on macOS is safe to ignore. Fix only the items relevant to the platforms you actually intend to build for.3. Setting Up Android Studio (Android SDK & Emulator)
Even if you plan to write your Flutter code in VS Code, you almost always still need Android Studio installed — not necessarily to write code in it, but because it bundles the Android SDK, platform tools, and the Android Virtual Device (AVD) manager used to create Android emulators.
- Download and install Android Studio from the official site.
- On first launch, go through the "Setup Wizard" so it downloads the Android SDK and SDK platform-tools.
- Open Tools > Device Manager (or AVD Manager) and create a virtual device — pick a recent Pixel profile and a system image.
- Run
flutter doctor --android-licensesand accept the licenses ifflutter doctorflags them as unsigned.
4. Setting Up Xcode for iOS (macOS only)
Building and running iOS apps — even in the Simulator — requires a Mac with Xcode installed from the App Store. After installing Xcode:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
// Install CocoaPods, used to manage iOS native dependencies
sudo gem install cocoapods
Open the iOS Simulator via Xcode > Open Developer Tool > Simulator, or simply
run open -a Simulator from the terminal, to have a target device ready for
flutter run.
5. Choosing an Editor: VS Code vs Android Studio
Either editor works well for Flutter development — pick whichever you're already comfortable with.
| Editor | Setup |
|---|---|
| VS Code | Lightweight and fast. Install the official "Flutter" extension from the marketplace (it automatically pulls in the "Dart" extension too) for syntax highlighting, debugging, hot reload buttons, and widget inspection. |
| Android Studio / IntelliJ | Heavier but fully integrated with the Android SDK tooling already installed. Install the "Flutter" plugin via Settings > Plugins (it pulls in the "Dart" plugin automatically). |
Both give you run/debug buttons, a device selector dropdown, and integrated hot reload — the experience is very similar day-to-day.
6. Connecting a Device or Emulator
You need at least one target to run your app against: an Android emulator, an iOS simulator, a physical Android phone with USB debugging enabled, or a physical iPhone. Check what Flutter can currently see with:
flutter devices
For a physical Android device, enable "Developer options" (tap the Build Number 7 times in Settings > About Phone) and turn on "USB debugging," then connect via USB and accept the debugging prompt on the device.
7. Creating and Running a Starter Project
With the SDK, an editor, and at least one device or emulator ready, verify everything end-to-end by generating and running Flutter's default starter project:
flutter create my_app
cd my_app
flutter run
flutter create scaffolds a complete runnable project (we'll look inside it in detail
in the "Your First App" lesson). flutter run builds the app and installs it on
whichever device/emulator is currently selected, then keeps a session open in your terminal that
listens for hot reload key presses while it runs.
8. Release Channels: flutter channel
The Flutter SDK is distributed on several release channels, and you can switch between them with
flutter channel:
flutter channel
// Switch channel, then apply it
flutter channel stable
flutter upgrade
| Channel | Use case |
|---|---|
| stable | Thoroughly tested releases. This is what you should use for any real or production project. |
| beta | Newer features ahead of stable, less battle-tested. Useful for previewing upcoming changes. |
| master | The bleeding edge of active development — can be unstable, intended mainly for contributors to the Flutter engine itself. |
stable channel unless you have a specific reason not to — it's what virtually every production Flutter app is built on.