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.27.2 2021-10-11

v3.27.1 2021-10-08

v3.27.0 2021-10-04

Test Runner Improvements

#3574/#3572: Integration with the new VS Code Test Runner is now enabled by default. Some additional improvements have been made to the integration.

The test tree previously only populated from the file contents when it was first opened, and subsequently only when tests ran. Now the tree updates periodically as the file is modified, including removing tests that have been removed from the file without needing to re-run the whole file or clear the test results.

Dynamic tests (those with variables in their name or using features like Flutter testWidgets variants) are now grouped under a parent node using the name of the test from the editor. As well as being easier to manage, these can now be removed from the tree if the test definition is renamed rather than remaining until you re-run the entire file.

Failed tests will now show their failure message with an expandable Peek window containing the output and history for the test (this requires VS Code 1.61).

Running multiple tests from a gutter icon/tree node are now grouped together by suite so that they run more quickly rather than a seperate debug session per-test.





Docs / website


Features Enabled with Future SDKs

These features rely on changes to the Dart/Flutter SDKs that have not yet been released to stable channels. They will show up automatically when you update your SDK in future (or if using development channels depending on the exact version).

Renaming Files with Classes

#3354: A new setting "dart.renameFilesWithClasses" has been added that allows automatic renaming of files (and updating imports) when classes are renamed if the class/filename match. The allowed options are "never", "prompt" and "always". "never" is the default and disables renaming. "prompt" will ask on each rename, and "always" will rename without prompting.

For the rename to work, the class name and the filename must match (apart from differences in PascalCase for class names and snake_case for files).

New TODO Comments Types

#2364: In addition to TODO, several new comment prefixes are recognised and generate diagnostics - HACK, FIXME and UNDONE. These can be controlled with the analysis_options.yaml file.

Editor Changes

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!