0
0
FlutterHow-ToBeginner Ā· 4 min read

How to Install Flutter: Step-by-Step Guide for Beginners

To install Flutter, download the Flutter SDK from the official website, extract it, and add the flutter/bin folder to your system's PATH. Then run flutter doctor in your terminal to check and complete the setup.
šŸ“

Syntax

The basic steps to install Flutter are:

  • Download the Flutter SDK zip file for your OS.
  • Extract it to a desired location.
  • Add the flutter/bin directory to your system PATH.
  • Run flutter doctor to verify installation and install dependencies.
bash
flutter doctor
šŸ’»

Example

This example shows how to check your Flutter installation and environment setup using the flutter doctor command.

bash
flutter doctor
Output
[āœ“] Flutter (Channel stable, 3.7.0, on macOS 13.3 22E261 darwin-x64, locale en-US) [āœ“] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [āœ“] Xcode - develop for iOS and macOS [āœ“] Chrome - develop for the web [āœ“] Android Studio (version 2021.1) [āœ“] VS Code (version 1.75.0) [āœ“] Connected device (2 available) • No issues found!
āš ļø

Common Pitfalls

Common mistakes when installing Flutter include:

  • Not adding flutter/bin to the PATH, causing commands to fail.
  • Skipping flutter doctor and missing required dependencies like Android SDK or Xcode.
  • Using outdated Flutter versions or channels.
  • Not accepting Android licenses, which blocks Android builds.
bash
Wrong:
flutter

Right:
export PATH="$PATH:[PATH_TO_FLUTTER_DIRECTORY]/bin"
flutter doctor
šŸ“Š

Quick Reference

StepDescription
Download SDKGet Flutter SDK zip from flutter.dev
ExtractUnzip to a folder on your computer
Set PATHAdd flutter/bin to your system PATH environment variable
Run flutter doctorCheck setup and install missing dependencies
Accept licensesRun flutter doctor --android-licenses for Android
āœ…

Key Takeaways

Download and extract Flutter SDK from the official site.
Add flutter/bin to your system PATH to run Flutter commands anywhere.
Run flutter doctor to verify installation and fix missing dependencies.
Accept Android licenses to enable Android app development.
Keep Flutter updated by switching to the stable channel.