Skip to content

Development Enviroment

Virtual devices can be created by opening the command-palette and selecting Flutter: Select DeviceAnd selecting create android emulator. However, the performance is not Accurate and convenience is limited, therefore I recommend using a physical device.

Android devices can be use for running builds by enabling USB debugging from Android developer settings. This is done by:

  1. Open settings and navigate to About Phone
  2. Tab on the build number 7 times until a confirmation message appear
  3. Then enter Developer Options and enable USB debugging
  4. Plug the phone into the computer with USB connection

Now when selecting VSCode/command-palette/Flutter: Select Device. The identifier of the phone will Appear.

  1. Install the Dart extension (dart-code.dart-code)
  2. Install the Flutter extension (flutter.flutter-vs-code)
  3. Open a Dart file — the extension auto-detects the SDK
  1. Install the Dart plugin from the marketplace
  2. Configure the Dart SDK path in Settings > Languages & Frameworks > Dart

Use dart analyze for static analysis and dart format for code formatting:

Terminal window
dart analyze # static analysis
dart format . # format all files
dart run # run the main entry point
dart test # run tests

A typical Dart project:

my_project/
bin/ # Entry point scripts
main.dart
lib/ # Library code (imported by other packages)
my_project.dart
test/ # Unit and integration tests
my_project_test.dart
pubspec.yaml # Package metadata and dependencies
analysis_options.yaml # Linter and analyzer settings
  1. Wrong SDK path: Ensure dart --version works in your terminal before configuring your IDE.
  2. Missing pub get: Always run dart pub get after changing pubspec.yaml.
  3. Conflicting SDK versions: Use dart --version to verify you’re on the expected Dart version across all tools.
Terminal window
dart create my_app
cd my_app
dart run
Terminal window
dart test # run all tests
dart test test/my_test.dart # run a specific test
dart test --reporter expanded # verbose output

Setting up a Dart development environment requires the Dart SDK, an IDE with Dart support, and understanding the standard project structure. Use dart pub get to manage dependencies and dart analyze to catch issues early.