/usr/local). The Flutter CLI needs write access to its own directory for SDK updates.
In production or multi-project environments, you need to pin Flutter/Dart versions per project:
dart pub global activate fvm
## Install a specific Flutter version
# Run flutter commands through fvm
fvm flutter build apk --release
fvm use creates an .fvmrc file in the project root. Team members run fvm use to switch to the Correct version.
The Dart SDK is versioned independently. Check your version:
# Dart SDK version: 3.5.0 (stable) on "linux_x64"
To change the Dart SDK channel (stable, beta, dev):
After installation, verify everything:
dart compile exe -o hello hello.dart # test AOT compilation
flutter doctor -v # verbose environment check
flutter doctor -v output should look something like:
[✓] Flutter (Channel stable, 3.24.0)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✗] Linux toolchain - develop for Linux desktop
! clang++ is not installed
Every [✓] means that toolchain is ready. [✗] items need attention — follow the diagnostic Output.
Install VS Code, then add these extensions:
| Extension | ID | Purpose |
|---|
| Dart | dart-code.dart-code | Syntax, analysis, debugging, pub support |
| Flutter | dart-code.flutter | Widget editing, DevTools, emulator control |
| Flutter Snippets | alexisvt.flutter-snippets | Boilerplate code generation |
After installing, open a Dart/Flutter project folder. VS Code will prompt you to select the Flutter SDK location if it is not already in PATH.
Key VS Code shortcuts for Dart:
| Action | Shortcut |
|---|
| Run (debug) | F5 |
| Hot reload | Ctrl+F5 / Cmd+F5 (while debugging) |
| Go to definition | F12 |
| Rename symbol | F2 |
| Quick fix | Ctrl+. / Cmd+. |
| Format document | Shift+Alt+F / Shift+Option+F |
Android Studio includes the Dart and Flutter plugins by default when you install the Flutter SDK Through its installer:
- Download Android Studio from https://developer.android.com/studio
- Install the Flutter and Dart plugins: Settings > Plugins > Marketplace > “Flutter”
- Configure the SDK path: Settings > Languages & Frameworks > Flutter > Flutter SDK path
Android Studio provides:
- Visual layout editor (not as useful for Flutter as for XML layouts)
- Android Emulator (AVD Manager)
- Profiler and APK analyzer
Install the Dart plugin from JetBrains Marketplace. It provides the same analysis engine as Android Studio without the Android-specific tooling.
- Ensure VS Code, the extensions, and git is installed and updated.
- Launch VS Code and open command palette (
Ctrl+Shift+P) - With the
dart-code.flutter installed, typing flutter in command palette shows a command of Flutter: New Project. - VS Code will now prompt you to locate your Flutter SDK, select
Download SDK which automatically installs the Flutter SDK and adds to PATH, Remember to choose a location that doesnt require elevated priviledges. - Now type
flutter doctor in the terminal and resolve any missing SDK or packages - I would recommend installing android sdk from android studio
- I would also recommend installing Visual Studio if windows development is needed.
- If the developement platform is Windows, the path may not have added correctly, include the android sdk, dart sdk and flutter sdk in path.
dart create -t console my_cli
This creates a minimal console application with a pubspec.yaml``bin/And test/ directory.
This creates a full Flutter project with platform-specific directories (android/``ios/``web/ macos/``linux/``windows/).
├── analysis_options.yaml
│ └── my_cli.dart # entry point
├── pubspec.yaml # dependencies and metadata
├── pubspec.lock # pinned dependency versions
└── my_cli_test.dart # tests
- PATH issues on Windows: The Flutter SDK modifies PATH during installation but many terminals (especially PowerShell) need a restart to pick up changes. Run
refreshenv or restart the terminal. - Multiple SDK versions: If you install both standalone Dart SDK and Flutter SDK, the
dart binary on PATH may point to the wrong one. Use which dart / where dart to verify. Uninstall the standalone Dart SDK if you are using Flutter. - Xcode license on macOS: Even for pure Dart development,
flutter doctor may complain about Xcode. Run sudo xcodebuild -license accept to resolve this. - Android SDK cmdline-tools:
flutter doctor expects cmdline-tools/latest/bin in the Android SDK path. Install it via Android Studio’s SDK Manager under “SDK Tools”.
If you are targeting Android devices, you need the Android SDK. The recommended path is through Android Studio.
- Download from https://developer.android.com/studio
- Run the installer (it bundles Android SDK, SDK Platform-Tools, and Android Emulator)
- Launch Android Studio and complete the setup wizard. It downloads the latest SDK and system images
Add these to your shell profile (~/.bashrc``~/.zshrcEtc.):
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
flutter doctor --android-licenses
Accept all licenses. This is required before you can build APKs.
Within Android Studio: Settings > Appearance & Behavior > System Settings > Android SDK
Required components:
| Component | Purpose |
|---|
| Android SDK Platform 34 (or latest) | Target API level |
| Android SDK Build-Tools | aapt``d8``dx build tools |
| Android SDK Platform-Tools | adb``fastboot |
| Android SDK Command-line Tools | sdkmanager CLI |
| Android Emulator | emulator binary |
| Intel x86 Emulator Accelerator (HAXM) or KVM | Hardware acceleration for emulator |
adb devices # list connected devices/emulators
emulator -list-avds # list available virtual devices
flutter devices # list all Flutter-visible devices
- Install Xcode from the Mac App Store
- Accept the license:
sudo xcodebuild -license accept - Install command line tools:
xcode-select --install - Install CocoaPods:
sudo gem install cocoapods (or brew install cocoapods)
sudo xcodebuild -license accept
xcrun --sdk iphoneos --show-sdk-path # should print the SDK path
flutter devices # should show "macOS" and "iPhone" simulator
For Windows desktop development (UWP/Win32 Flutter apps):
- Install Visual Studio 2022 with the following workloads:
- Desktop development with C++
- Universal Windows Platform development (optional, for UWP)
- Ensure the Windows 10/11 SDK is installed
# Look for: [✓] Visual Studio - develop Windows apps
For Linux desktop development:
sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
On Fedora:
sudo dnf install clang cmake ninja-build gtk3-devel libXtst-devel pkgconfig
Verify:
flutter devices # should show "Linux (desktop)"
No additional installation is required for web development. Flutter includes the dart2js and dart2wasm compilers.
flutter devices # should show "Chrome" and "Edge" if browsers are installed
Delete the Flutter directory and remove it from PATH:
rm -rf ~/development/flutter
# Remove the PATH export from your shell profile
# Windows: Use Programs and Features in Control Panel
The pub cache can grow large over time:
dart pub global deactivate fvm
flowchart TD
A[01 Installation] --> B[Key Concepts]
A --> C[Core Principles]
A --> D[Practical Applications]
B --> E[Fundamental definitions]
C --> F[Design patterns]
D --> G[Real-world usage]This topic covers the core concepts of installation, including underlying theory, practical implementation, and key applications.
Key concepts include:
- command-line fundamentals
- file permissions and ownership
- process management
- shell scripting with bash
- package management
Understanding these concepts thoroughly is essential for both examinations and practical programming, and requires both theoretical knowledge and hands-on practice.
Worked examples demonstrating the application of key concepts are covered in the detailed sub-pages linked above.
Setting up Dart involves choosing between the standalone Dart SDK (for server-side and CLI tools) and the Flutter SDK (which bundles Dart for cross-platform UI development). The Flutter SDK includes everything you need: the Dart compiler, the Impeller rendering engine, and platform-specific toolchains. Version management with fvm ensures that different projects can use different Flutter versions without conflicts. The pub package manager handles dependency resolution with a lockfile model similar to npm or Cargo, ensuring reproducible builds across machines.