For instructions on installing the Dart or Flutter extensions, go here.
v3.28.0 2021-11-01
Automatic Test Discovery
#3591: It’s no longer required to open or run a test file for tests to be discovered. Test files will be discovered automatically at startup and expanding them will discover the tests within.
Non-Error Test Output
#3606: All output from tests is now recorded in the test history, rather than only error output:
Hot Reload for Dart
#2708: A new command Dart: Hot Reload allows hot reloading in Dart (non-Flutter) programs.
Other Test Runner Improvements
- #3595, #3599: The Run Tests button in the VS Code test runner now runs tests more quickly in a single debug session when running full suites (match performance of the legacy Dart: Run All Tests command), even if there are excluded (hidden) test files.
- #3597: The Run Tests button in the VS Code test runner is no longer restricted to only tests in the
test
folder (for example tests inintegration_test
can be run). - #3605: The locations of dynamic tests in the runner are now kept up-to-date more reliably, so Go-to-Test should no longer sometimes go to the wrong location after modifying the test file.
- #3596: Running multiple test files no longer prompts to run for each file if you have unresolved analysis errors.
- #3643: The test runner now consistently uses
\
for path seperators on Windows.
Flutter Improvements
Editor Improvements
- #3633: Angle brackets around type arguments are no longer colored inconsistently for some VS Code themes.
- #3589: @Ascenio improved the snippet for a
main
method to include a return type. - #3640: @rlch contributed a new setting
dart.onlyAnalyzeProjectsWithOpenFiles
that runs the LSP server in a mode that does not analyze the whole workspace, but only projects for open files. This may improve performance for large workspaces but may limit some functionality.
Other
- #3613: The
dart.previewLsp
setting has been renamed todart.useLsp
. LSP is no longer considered a preview and should be used by everyone. This setting (and support for using the old server protocol) will be removed in an future release so if you believe you have a need to disable LSP, please file an issue on GitHub with details. - #2098: The
dart.useKnownChromeOSPorts
setting has been removed as it is no longer required to use specific ports on ChromeOS.
Documentation
- #3571: The description of the
dart.completeFunctionCalls
setting has been improved to make it clearer which arguments will have placeholders inserted.
Features Enabled with Future SDKs
These items 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).
- #3638: Setting
dart.onlyAnalyzeProjectsWithOpenFiles
should no longer prevent the analysis server from fully initialising. - #3621: The identifier part of an annotation now has a modifier
"annotation"
so that colors can be customised with"editor.semanticTokenColorCustomizations"
(for example to allow matching the colour of the annotations@
tag). - #3618: Class fields now have semantic token type
"property"
instead of"variable"
to match guidelines in the VS Code docs. - #3583: Using the Format Selection command or
"editor.formatOnSaveMode": "modifications"
to format only modified lines will no longer fail to format the leading indentation of the first line of a range. - #3584: DevTools is now started using the
"dart devtools"
command instead of"pub global"
for new SDKs. This means the version will match what is shipped in the SDK and not what’s published to Pub.
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!