Skip to content

Flutter - Installation

This chapter guides you through installing the Flutter SDK and setting up your development environment on Windows, macOS, and Linux.

Important: System requirements and specific steps can change. Always refer to the official Flutter installation documentation for the most up-to-date instructions: https://docs.flutter.dev/get-started/install

  • Operating System: Windows 10 or later (64-bit), macOS (64-bit), Linux (64-bit).
  • Disk Space: At least 1.64 GB (does not include IDEs/tools).
  • Tools: Flutter depends on git being available in your environment.
  • Go to the Flutter SDK releases page: https://docs.flutter.dev/get-started/install/windows
  • Download the latest stable release bundle (a .zip file).
  • Extract the zip file to a permanent location on your computer where you want to keep Flutter (e.g., C:\src\flutter). Do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges.
  • In the Windows Search bar, type ‘env’ and select Edit the system environment variables.
  • Click the Environment Variables... button.
  • Under User variables, find the Path entry, select it, and click Edit....
  • Click New and add the full path to the bin directory within your Flutter installation folder (e.g., C:\src\flutter\bin).
  • Click OK on all dialog windows to save the changes.
  • Important: Close and reopen any existing Command Prompt or PowerShell windows for the path change to take effect.
  • Open a new Command Prompt or PowerShell window.
  • Run the command: flutter doctor
  • flutter doctor checks your environment and displays a report of the status of your Flutter installation. It will identify missing dependencies or further setup required.
  • Example Output (may vary):

4. Install Android Studio (for Android Development)

Section titled “4. Install Android Studio (for Android Development)”
  • Download and install Android Studio from the official Android Developers site.
  • During setup, ensure you install the Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools.
  • flutter doctor will guide you if components are missing.
  • Emulator: Use the Android Studio AVD Manager (Tools > AVD Manager) to create and launch an Android Virtual Device.
  • Physical Device: Enable Developer options and USB debugging on your Android phone, then connect it via USB. Follow prompts on the device and computer to authorize.
  • Run flutter doctor again to verify device connection.
  • Open Android Studio.
  • Go to File > Settings > Plugins (or Android Studio > Preferences... > Plugins on older versions).
  • Search for Flutter in the Marketplace tab and click Install.
  • Accept the prompt to install the required Dart plugin as well.
  • Restart Android Studio when prompted.
  • Go to the Flutter SDK releases page: https://docs.flutter.dev/get-started/install/macos
  • Download the latest stable release bundle for your Mac’s architecture (Intel or Apple Silicon).
  • Extract the zip file to a permanent location (e.g., $HOME/development/flutter).
  • Alternatively, you can clone the repository: git clone https://github.com/flutter/flutter.git -b stable
  • Open or create your shell’s configuration file (e.g., $HOME/.zshrc for Zsh (default on newer macOS), $HOME/.bash_profile for Bash).
  • Add the following line, replacing [PATH_TO_FLUTTER_GIT_DIRECTORY] with the actual path to your Flutter directory:
  • export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
  • Save the file.
  • Run source $HOME/.<your_config_file> (e.g., source $HOME/.zshrc) or open a new terminal window for the changes to take effect.
  • Verify the path: echo $PATH (should include the flutter/bin path) and which flutter.
  • Open a new Terminal window.
  • Run the command: flutter doctor
  • Review the output for any missing dependencies.
  • Example Output (may vary):

4. Install Xcode (for iOS/macOS Development)

Section titled “4. Install Xcode (for iOS/macOS Development)”
  • Install Xcode from the Mac App Store.
  • Open Xcode once after installation and accept the license agreement.
  • Install the Xcode command-line tools: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer and sudo xcodebuild -runFirstLaunch.
  • Run flutter doctor again to ensure Xcode setup is complete.
  • Simulator: Open the simulator via Xcode (Xcode > Open Developer Tool > Simulator) or using the command open -a Simulator.
  • Physical Device: Connect your iOS device via USB. You may need to configure code signing in Xcode to deploy to a physical device (requires an Apple Developer account).

6. Install Android Studio and Plugins (Optional, for Android Development)

Section titled “6. Install Android Studio and Plugins (Optional, for Android Development)”
  • Follow steps 4 & 6 from the Windows installation section if you also plan to develop for Android.
  • Go to the Flutter SDK releases page: https://docs.flutter.dev/get-started/install/linux
  • Download the latest stable release bundle (.tar.xz).
  • Extract the file in a desired location: tar xf flutter_linux_*.tar.xz -C $HOME/development (replace path as needed).
  • Alternatively, use snapd: sudo snap install flutter --classic (this also handles the path setup).
  • Open your shell’s configuration file (e.g., $HOME/.bashrc or $HOME/.zshrc).
  • Add the following line: export PATH="$PATH:[PATH_TO_FLUTTER_DIRECTORY]/flutter/bin"
  • Run source $HOME/.<your_config_file> or open a new terminal.
  • Verify: which flutter.
  • Flutter requires several command-line tools. Run flutter doctor and install any missing dependencies reported. Common ones include bash, curl, file, git, unzip, which, xz-utils, zip, and libraries like libGLU.so.1.
  • Use your distribution’s package manager (e.g., apt, dnf) to install them. Example for Debian/Ubuntu:
  • sudo apt update && sudo apt install -y bash curl file git unzip which xz-utils zip libglu1-mesh
  • Run flutter doctor in a terminal.
  • Address any issues reported, especially for Android Studio, Android toolchain, or connected devices.

5. Install Android Studio and Set up Devices

Section titled “5. Install Android Studio and Set up Devices”
  • Follow steps 4, 5, & 6 from the Windows installation section.

Once flutter doctor shows no major issues (or issues only for platforms you don’t intend to target), your environment is ready. You can proceed to create your first Flutter application!