Setting Up Flutter on Windows/Mac/Linux
✅ Setting Up Flutter on Windows, macOS, or Linux
Flutter is an open-source framework by Google used to build cross-platform apps for Android, iOS, web, and desktop — all from a single codebase.
π§ System Requirements
Windows
Windows 10 or 11 (64-bit)
PowerShell 5.0 or newer
Git (for version control)
Disk space: ~1.5 GB (more for Android Studio)
macOS
macOS 12 (Monterey) or later
Xcode (for iOS development)
Git
Disk space: ~2 GB+
Linux
Recent 64-bit Linux distribution
Bash, mkdir, rm, git, curl, unzip (typically pre-installed)
Disk space: ~600 MB+
π¦ Step 1: Download Flutter SDK
Go to the official Flutter website:
π https://flutter.dev/docs/get-started/install
Choose your operating system and download the Flutter SDK.
π Step 2: Extract the Flutter SDK
Windows
Extract the .zip file to a directory like C:\src\flutter
macOS / Linux
Extract the .tar.xz file to a location like ~/development/flutter using:
bash
Copy
Edit
tar xf flutter_linux_*.tar.xz
π Step 3: Add Flutter to Your PATH
Windows
Open Environment Variables.
Edit the Path variable.
Add the path to the flutter/bin directory (e.g., C:\src\flutter\bin).
macOS/Linux
Add this line to your shell config file:
bash
Copy
Edit
export PATH="$PATH:$HOME/development/flutter/bin"
Then run:
bash
Copy
Edit
source ~/.bashrc # or ~/.zshrc depending on your shell
✅ Step 4: Verify Installation
Open a terminal or command prompt and run:
bash
Copy
Edit
flutter doctor
This command checks your environment and shows what needs to be fixed (e.g., missing Android SDK or Xcode).
π± Step 5: Set Up Android (and iOS on macOS)
Android (all platforms)
Install Android Studio from https://developer.android.com/studio
Open it, go to SDK Manager, install:
Android SDK
SDK Platform Tools
Android Emulator (optional but useful)
iOS (macOS only)
Install Xcode from the App Store
Run sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Agree to Xcode license: sudo xcodebuild -license
π² Step 6: Create and Run a Flutter App
Create a new app
bash
Copy
Edit
flutter create my_app
cd my_app
Run the app
Use a physical device or emulator/simulator
bash
Copy
Edit
flutter run
π§ͺ Bonus: Enable Web or Desktop Support (optional)
Web
bash
Copy
Edit
flutter config --enable-web
macOS Desktop
bash
Copy
Edit
flutter config --enable-macos-desktop
Windows/Linux Desktop
bash
Copy
Edit
flutter config --enable-windows-desktop # or --enable-linux-desktop
Then run:
bash
Copy
Edit
flutter devices
to see all available targets.
π You're Ready!
You’ve now set up Flutter on your system! You can start building cross-platform apps with a single codebase.
Learn Flutter Training in Hyderabad
Read More
What is Flutter? An Introduction for Beginners
Visit Our IHUB Talent Training Institute in Hyderabad
Comments
Post a Comment