Skip to content
writing

December 20, 2024 · 4 min read

Installing Flutter on Windows and macOS

A step-by-step guide to a working Flutter toolchain on both Windows and macOS — SDK, PATH, the platform tooling, flutter doctor, and running your first app.

Before you write a single widget, you need a working toolchain. Flutter's setup is straightforward once you know the moving parts: the SDK itself, your shell's PATH, the platform tooling (Xcode and/or Android Studio), and flutter doctor to tie it all together. Here's the full path on both macOS and Windows.

What you're installing

  • The Flutter SDK — the flutter and dart command-line tools plus the framework.
  • A device toolchain — Xcode for iOS (macOS only) and/or Android Studio for Android.
  • An editor — VS Code or Android Studio with the Flutter/Dart plugins.

flutter doctor is your friend throughout: it inspects your machine and tells you exactly what's missing.

macOS

1. Prerequisites

On Apple Silicon (M-series), install Rosetta so some tooling runs:

sudo softwareupdate --install-rosetta --agree-to-license

2. Get the SDK

Download the SDK bundle from docs.flutter.dev, or clone the stable channel:

mkdir -p ~/development
cd ~/development
git clone https://github.com/flutter/flutter.git -b stable

3. Add Flutter to your PATH

macOS uses zsh by default. Add the SDK's bin folder to your PATH:

echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
flutter --version   # verify it's found

4. iOS toolchain (Xcode)

Install Xcode from the App Store, then:

sudo xcodebuild -runFirstLaunch
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

# CocoaPods manages iOS native dependencies:
sudo gem install cocoapods

5. Android toolchain

Install Android Studio, open it once so it downloads the Android SDK and command-line tools, then accept the licenses:

flutter doctor --android-licenses

Windows

1. Prerequisites

Install Git for Windows (Flutter uses it under the hood), and enable Developer Mode so symlinks and plugins work:

start ms-settings:developers

2. Get the SDK

Download the Flutter SDK zip from docs.flutter.dev and extract it to a path without spaces or special characters — a good choice is:

C:\src\flutter

Avoid C:\Program Files\ (it needs elevated permissions and has a space).

3. Add Flutter to your PATH

Open "Edit the system environment variables" → Environment Variables, and add this to your user Path:

C:\src\flutter\bin

Open a new terminal and verify:

flutter --version

4. Android toolchain

Install Android Studio, launch it to pull down the Android SDK, then accept the licenses:

flutter doctor --android-licenses

(iOS builds require a Mac — on Windows you'll target Android, web, and Windows desktop.)

Run flutter doctor

On either OS, this is the moment of truth:

flutter doctor

Work down the checklist until every line has a green check. A typical clean result:

[√] Flutter (Channel stable, 3.x.x)
[√] Android toolchain - develop for Android devices
[√] Xcode - develop for iOS and macOS      (macOS only)
[√] Chrome - develop for the web
[√] VS Code

Anything with a [!] or [✗] comes with a hint telling you what to install next.

Set up your editor

  • VS Code — install the Flutter extension (it pulls in Dart too).
  • Android Studio — install the Flutter and Dart plugins from Preferences → Plugins.

Both give you hot reload, debugging, and widget inspection out of the box.

Create and run your first app

flutter create my_app
cd my_app
flutter run          # pick a device when prompted

While it's running, edit lib/main.dart, save, and watch hot reload update the app in under a second. That feedback loop is the whole point of Flutter.

Bonus: pin your SDK version with FVM

On real projects, teams pin the Flutter version per repository so everyone builds identically. FVM makes that easy:

dart pub global activate fvm
fvm install 3.24.0
fvm use 3.24.0        # writes .fvmrc into the project
fvm flutter run       # runs the pinned version

Troubleshooting

  • flutter: command not found — your PATH change hasn't loaded. Open a new terminal, and on macOS confirm the line is in ~/.zshrc.
  • Android licenses not accepted — rerun flutter doctor --android-licenses and answer y.
  • CocoaPods errors on macOSsudo gem install cocoapods then pod repo update.
  • Windows long-path errors — keep the SDK at C:\src\flutter and make sure Developer Mode is on.

Once flutter doctor is all green, you're ready to build. From here, the next stop is the language itself — Dart fundamentals — and then your first real widgets.

New writing, now and then

Essays on Flutter, Dart and the decisions behind real systems. No schedule, no filler.

One click to unsubscribe, in every email.