Skip to content

Development Enviroment | Dart - Wyatt's Notes

flowchart TD
    A[02 Dev Enviroment] --> B[Key Concepts]
    A --> C[Core Principles]
    A --> D[Practical Applications]
    B --> E[Fundamental definitions]
    C --> F[Design patterns]
    D --> G[Real-world usage]

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 settingsThis 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 DeviceThe 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.

This section provides detailed coverage of advanced concepts, including full derivations, proofs, and extended examples.

Complete mathematical derivations and proofs are provided where appropriate. Each step is explained to ensure understanding of the underlying reasoning.

Advanced examples demonstrate the application of concepts to complex problems. These examples go beyond standard exam questions to develop deeper understanding.

This material connects to current research and advanced applications in the field. Understanding these connections provides context for the study material.

Ensure you have mastered the prerequisite material before attempting this advanced content.

This section provides detailed coverage of advanced concepts, including full derivations, proofs, and extended examples.

Complete mathematical derivations and proofs are provided where appropriate. Each step is explained to ensure understanding of the underlying reasoning.

Advanced examples demonstrate the application of concepts to complex problems. These examples go beyond standard exam questions to develop deeper understanding.

This material connects to current research and advanced applications in the field. Understanding these connections provides context for the study material.

Ensure you have mastered the prerequisite material before attempting this advanced content.

This section provides detailed coverage of advanced concepts, including full derivations, proofs, and extended examples.

Complete mathematical derivations and proofs are provided where appropriate. Each step is explained to ensure understanding of the underlying reasoning.

Advanced examples demonstrate the application of concepts to complex problems. These examples go beyond standard exam questions to develop deeper understanding.

This material connects to current research and advanced applications in the field. Understanding these connections provides context for the study material.

Ensure you have mastered the prerequisite material before attempting this advanced content.

This section provides detailed coverage of advanced concepts, including full derivations, proofs, and extended examples.

Complete mathematical derivations and proofs are provided where appropriate. Each step is explained to ensure understanding of the underlying reasoning.

Advanced examples demonstrate the application of concepts to complex problems. These examples go beyond standard exam questions to develop deeper understanding.

This material connects to current research and advanced applications in the field. Understanding these connections provides context for the study material.

Ensure you have mastered the prerequisite material before attempting this advanced content.