Dart Code
Dart & Flutter support for Visual Studio Code Discord Chat Follow on Twitter Contribute to Dart Code

For instructions on installing the Dart or Flutter extensions, go here.

v3.64.0 2023-05-10

Testing Improvements

#4021/#4487: A new setting "dart.testInvocationMode" has been added that allows you to choose how tests are executed from the test runner and CodeLens links.

Previously, tests were always executed using their name by issuing a command like:

dart test test/foo_test.dart --name "my test"

This could fail to run the correct test if groups/tests have dynamic names, unusual characters or similar/duplicated names. Selecting "line" in the new setting will instead (when supported by your version of package:test) run tests using their line number:

dart test "test/foo_test.dart?line=4"

This resolves a number of issues, including:

For now, the default setting remains "name" but you are encouraged to test out "line" and file issues if you find any places where it does not work as expected. In a future release "line" may become the default.

Go to Symbol in Workspace Improvements

#1903: A new setting has been added that allows excluding SDK/package symbols from the Go to Symbol in Workspace (cmd+T) search which can considerably speed up the search for large workspaces.

Experimental Refactors: Move to File

#1831#4159/#4467: A new setting "dart.experimentalRefactors" has been added to allow gathering feedback of new refactors.

The first available refactor (for Dart 3.0 / Flutter 3.10) is “Move to File” that allows moving top level declarations to another (new or existing) file.

Experimental refactors may be incomplete or not produce the correct code in all cases.

“Move to File” Known Issues:

Debugger Format Specifiers and Hex view

#3940/#4365: When using the new SDK debug adapters (enabled for Dart and rolling out for Flutter), you can change the format of numbers in the Variables/Watch window between Hex and Decimal.

Additionally, you can add “format specifiers” to the end of evaluated expressions to affect how they are rendered:

Format specifiers apply to child values so adding ,nq to an expression that evalutes to a List<String> will suppress quotes for each value.




Upstream Issues

Some feature requests and fixes require new features and fixes in upstream projects like VS Code and LSP which use counts of 👍s on those issues to help gauge demand. The Dart-Code website now lists some of the most significant upstream issues with a description of the feature/fix they would enable. Please consider reviewing this list and adding your 👍 to any GitHub issues relevant to features you’d like to see!