Setting Up Flutter on Windows/Mac/Linux

Setting Up Flutter on Windows, Mac, and Linux (Step-by-Step Guide)

Introduction

Flutter is Google’s open-source framework for building beautiful apps for mobile, web, and desktop using a single codebase.

If you’re new to Flutter and want to get started, you need to install it on your system.
This guide shows how to set up Flutter on Windows, Mac, and Linux — step-by-step.

Let’s begin!


Prerequisites (For All Platforms)

Before installing Flutter, make sure you have:

✅ A good internet connection
✅ Enough disk space (at least 2.5 GB for Flutter SDK)
✅ A text editor (VS Code or Android Studio recommended)


1. Setting Up Flutter on Windows

Step 1: Download Flutter SDK

🚫 Don’t install it in C:\Program Files\ (no admin rights needed)


Step 2: Update Your Path

  • Search for Environment Variables → Edit System Environment Variables

  • Under "System variables", select Path → Click Edit

  • Click New and add: C:\flutter\bin

  • Click OK to save.


Step 3: Install Git (if not installed)

  • Download Git: https://git-scm.com

  • Install with default options

  • Git is needed for Flutter commands to work


Step 4: Run Flutter Doctor

Open Command Prompt and run:

flutter doctor

This checks if everything is installed correctly.
It shows ✅ or ❌ for missing parts.


Step 5: Install Android Studio (Optional but Recommended)

  • Download from: https://developer.android.com/studio

  • During install, check:

    • Android SDK

    • Android Virtual Device

  • After install, run Android Studio → Install Flutter & Dart plugins


Step 6: Create Your First App

flutter create hello_world cd hello_world flutter run

Done! πŸŽ‰


2. Setting Up Flutter on Mac

Step 1: Download Flutter SDK


Step 2: Update Your Path

Open your terminal and run:

nano ~/.zshrc

Add this line:

export PATH="$PATH:/Users/yourname/flutter/bin"

Then save and run:

source ~/.zshrc

Step 3: Run Flutter Doctor

flutter doctor

This shows if anything is missing like Xcode, Git, etc.


Step 4: Install Xcode

  • Go to the App Store

  • Install Xcode

  • After install, run:

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

Step 5: Install CocoaPods

Run:

sudo gem install cocoapods

Pods are needed for iOS apps.


Step 6: Install Android Studio (Optional)

Same as Windows.
Also install Flutter and Dart plugins.


Step 7: Create & Run Your App

flutter create myapp cd myapp flutter run

You’re now ready to build iOS or Android apps! πŸš€


3. Setting Up Flutter on Linux

Step 1: Download Flutter SDK

tar xf flutter_linux_*.tar.xz

Move it to a location like /home/yourname/flutter


Step 2: Update Your PATH

Edit your shell config file:

nano ~/.bashrc # or ~/.zshrc

Add:

export PATH="$PATH:/home/yourname/flutter/bin"

Save and apply:

source ~/.bashrc

Step 3: Install Required Tools

Run:

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

These tools are required for Flutter and Android SDK.


Step 4: Run Flutter Doctor

flutter doctor

Fix any missing items shown.


Step 5: Install Android Studio


Step 6: Create and Run App

flutter create linux_app cd linux_app flutter run

You’re ready to build apps on Linux!


Bonus: Install VS Code (Optional on All Platforms)


Conclusion

Setting up Flutter is easy on Windows, Mac, or Linux if you follow the right steps.

Here’s a quick checklist:

✅ Download Flutter SDK
✅ Add it to your PATH
✅ Install Android Studio (optional but helpful)
✅ Run flutter doctor to check setup
✅ Create and run your first app

Now you can build fast, beautiful apps for Android, iOS, web, and desktop using just one codebase.



Read More 



Comments

Popular posts from this blog

Tosca System Requirements and Installation Guide (Step-by-Step)

How to Install Selenium for Python Step-by-Step

Tosca Commander: A Beginner’s Overview