Skip to content

Installation Setup

A robust development environment is key to productivity. We will set up the Flutter SDK and optimize Visual Studio Code for Flutter development.

Go to the official install page and download the stable release for your OS.

[!CAUTION] Do NOT install Flutter in folders requiring elevated permissions (like C:\Program Files on Windows). Use C:\src\flutter or ~/development/flutter.

Add the following to your ~/.zshrc or ~/.bashrc:

Terminal window
export PATH="$PATH:[PATH_TO_FLUTTER_DIRECTORY]/bin"

Run source ~/.zshrc to refresh.

Run the following command to diagnose your setup:

Terminal window
flutter doctor

Fix any issues marked with [x] by following the output instructions (usually involves accepting Android licenses or installing Xcode/Android Studio).

We recommend VS Code for its lightweight nature and powerful extensions.

Install these from the marketplace:

  1. Flutter (by Dart Code): The core extension. Debugging, Refactoring, Hot Reload.
  2. Dart (by Dart Code): Syntax highlighting and type verification.
  3. Pubspec Assist: Easily add dependencies without opening pubspec.yaml.
  4. Error Lens: See errors inline in your code editor.
  5. Bloc: (Optional) For easy boilerplate generation if using Bloc.

Add these to your VS Code settings.json for a better experience:

{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"dart.previewFlutterUiGuides": true,
"dart.flutterSdkPath": "/path/to/your/flutter/sdk"
}

Open the terminal in VS Code (Ctrl+`) and run:

Terminal window
flutter create my_first_app
cd my_first_app
code .

Press F5 to run the app on your connected device or emulator.