Skip to content

RonakDhingani/Flutter-Setup-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

Repository files navigation

πŸ› οΈ Flutter Setup Guide for Linux (Ubuntu), Windows & macOS

This guide walks developers through the complete setup of Flutter on their systems, with clear and detailed steps for Linux (Ubuntu), Windows, and macOS environments. Whether you're just starting out or need to reconfigure your environment, this step-by-step setup ensures you have a stable and working Flutter development setup.


πŸ“¦ System Requirements (All Platforms)

Before installing Flutter, ensure the following requirements are met:

  • βœ… A computer running Ubuntu (20.04 or newer), Windows 10/11, or macOS (Monterey or newer).
  • βœ… At least 8 GB of RAM (16 GB recommended for smooth Android emulator usage).
  • βœ… Minimum 10 GB free disk space.
  • βœ… Stable internet connection.
  • βœ… Git (required to clone the Flutter SDK).
  • βœ… IDE: Android Studio, Visual Studio Code, or IntelliJ IDEA.

🐧 Setup Flutter on Ubuntu (Linux)

βœ… Step 1: Install System Dependencies

Install the required packages to support Flutter and Android tools:

sudo apt update
sudo apt install git curl unzip xz-utils zip libglu1-mesa default-jdk -y

⚠️ default-jdk is required for Android builds and Gradle support.

βœ… Step 2: Download and Extract Flutter SDK

cd ~
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.22.1-stable.tar.xz
tar xf flutter_linux_3.22.1-stable.tar.xz

πŸ“‚ This will extract to ~/flutter. You can move it to another folder if needed.

βœ… Step 3: Add Flutter to PATH

echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.bashrc
source ~/.bashrc

πŸ’‘ To make it permanent across sessions, it’s added to .bashrc. If using zsh, use .zshrc instead.

βœ… Step 4: Install Android Studio

  1. Download .deb installer: Android Studio for Linux
  2. Install manually or using:
sudo apt install ./android-studio-*.deb
  1. Launch Android Studio and install the following:

    • Android SDK
    • SDK Tools: Platform Tools, Command Line Tools
    • Emulator (optional)

βœ… Step 5: Accept Android Licenses

flutter doctor --android-licenses

Press y repeatedly to accept all licenses.

βœ… Step 6: Verify Installation

flutter doctor -v

Make sure there are βœ… across all tools.


πŸͺŸ Setup Flutter on Windows

βœ… Step 1: Download Flutter SDK

  1. Visit Flutter for Windows
  2. Download flutter_windows_<version>_stable.zip
  3. Extract to: C:\src\flutter (Do NOT install in Program Files or directories requiring admin access)

βœ… Step 2: Add Flutter to PATH

  1. Open Start Menu β†’ Search Environment Variables
  2. Edit Path β†’ Add new: C:\src\flutter\bin
  3. Click OK and restart Command Prompt

βœ… Step 3: Install Git (if not installed)

Download Git for Windows

βœ… Step 4: Install Android Studio

  1. Download and install from developer.android.com/studio

  2. Open and configure SDK:

    • Install Android SDK, Command Line Tools
    • Setup emulator if needed

βœ… Step 5: Accept Android Licenses

Open CMD or PowerShell:

flutter doctor --android-licenses

Press y for all prompts.

βœ… Step 6: Run Flutter Doctor

flutter doctor -v

🍎 Setup Flutter on macOS

βœ… Step 1: Install Xcode and Command Line Tools

xcode-select --install

⚠️ Required for iOS builds and simulator support.

βœ… Step 2: Install Homebrew (Package Manager)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

βœ… Step 3: Install Flutter via Homebrew (Recommended)

brew install --cask flutter

βœ… Alternative: Manual Installation

cd ~
curl -O https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.22.1-stable.zip
unzip flutter_macos_3.22.1-stable.zip

βœ… Step 4: Add Flutter to PATH

echo 'export PATH="$PATH:$HOME/flutter/bin"' >> ~/.zshrc
source ~/.zshrc

πŸ” Restart Terminal to apply changes.

βœ… Step 5: Install CocoaPods

sudo gem install cocoapods

Required to build iOS apps.

βœ… Step 6: Run Flutter Doctor

flutter doctor -v

πŸ” Verifying Your Setup

Run:

flutter doctor -v

You should see βœ… next to:

  • Flutter
  • Android toolchain (SDK & licenses accepted)
  • Android Studio / IDE setup
  • Device connected or emulator available
  • iOS toolchain (on macOS)

If anything is ❌ or ⚠️, read the messages and follow the suggestions.


πŸ’‘ Additional Tips

  • Use flutter upgrade regularly to stay on the latest stable version.

  • Use flutter config to adjust settings like preferred editor or enabling web/macos support.

  • Android devices: Enable Developer Mode and USB Debugging.

  • iOS devices (macOS only): Trust the Mac and register the device with Xcode.

  • IDEs:

    • Install Flutter and Dart plugins.
    • Configure emulator/device for quick testing.

πŸ“Ž Useful Resources


Feel free to copy, fork, or improve this file. Happy building with Flutter! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published