For instructions on installing the Dart or Flutter extensions, go here.
v3.34.0 2022-02-01
Testing Improvements
- #3791: Tests in nested projects no longer run multiple times when using the Test: Run All Tests command (which often led to package resolution errors as they were running in the context of their parent projects).
- #3776: Using the
testGoldens
function from the fromgolden_toolkit
package will no longer cause issues when trying to run/view the results of tests in the tree. Tests may still appear duplicated in the tree if you are using a version ofgolden_toolkit
that does not include this PR (the fix for that is to upgrade thegolden_toolkit
package). - #3803/#3705: It’s now possible to override the launch configuration used when running/debugging tests from the test runner. See the Debugger section below for an example.
Debugger
- #3759: Clickable paths in stack traces in the Debug Console now jump to the correct line number (instead of always line 1) for assertion failure errors.
- #3803/#3802: Creating launch configurations for the standard
Run
/Debug
CodeLens links has been simplified so that it can be done with a single field (and now also applies to executions of tests from the test runner):"configurations": [ { "name": "Tests (VM+Chrome, Static Seed)", "request": "launch", "type": "dart", // Set "templateFor" to a path for this config to be used for all // Run/Debug links on CodeLens, or running from the test runner. // Set to an empty string "" for it to apply to the whole project. "templateFor": "test", // everything in test folder "args": [ "-p", "chrome,vm", "--test-randomize-ordering-seed=12345", ], "env": { "MY_ENV_VAR": "foo" } } ]
- #3749: The
customToolReplacesArgs
field in launch configurations (used to run custom tools in place ofdart
orflutter
when launching apps) can now be used to replace all tool arguments. However, custom tools must still be compatible with the tool they replace. Replacing/removing the--start-paused
argument does not remove the requirement for the custom tool to start the app paused, for example.
Editor
- #3804: Class fields are no longer incorrectly colored like methods/functions.
- #3788: The
dart.triggerSignatureHelpAutomatically
setting has been removed in favour of the built-ineditor.parameterHints.enabled
VS Code setting that does the same. - #3780: Pressing
<enter>
after starting a triple-quoted string ('''
or"""
) will no longer add unwanted indenting.
Flutter
- #3758: Flutter refactor commands in the context menu of Flutter Outline no longer fail on newer SDK versions.
- #3767: Trying to use
"console": "terminal"
or"console": "externalTerminal"
in the launch configuration for a Flutter app will now produce a notification that this is not supported (instead of being silently ignored). - #3756: The
customTool
field for launch configurations is now supported for Flutter apps.
Tasks
- #3795: Contributed tasks accessible via the Task: Run Task command can now be run for projects in sub-folders (eg. a monorepo) instead of only at the VS Code “workspace folder” level.
- #3801: The Dart: Generate Documentation command now uses the new
dart doc
command instead of the deprecateddartdoc
when using a recent enough SDK.
Pub
- #3764: Pub packages fetched by the extension (
devtools
,webdev
) will no longer be reactivated every session if the current latest published version has been retracted.
Docs
- #3798: The docs explaining the Dart: Use Recommended Settings command now make it clear that the command is only visible when a Dart project is open.
Features/Fixes 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 beta/development channels depending on the exact version).
- #3783: Code completion no longer activates while typing in standard double-slash comments that are immediately before a dartdoc triple-slash comment.
- #3778: A new
"instance"
semantic token modifier has been added to instance members, allowing them to be themed/colored separately to other symbols. - #3770: The Create Method ‘xxx’ fix now includes the
required
keyword for required named arguments if the library is null-safe. - #3761: Using analysis server plugins such as
dart_code_metrics
will no longer cause the servers view of a file to become out-of-sync with the editor, resulting in spurious diagnostic errors/warnings being reported. - #3697: The Dart: Sort Members command now correctly moves end-of-line comments along with the code on that line.
- #3422: A new lint
conditional_uri_does_not_exist
allows validating conditional import URIs to ensure they exist. - #1160: Hover tooltips now include the static type of a variable, which may be different to the declared type (for example if the variable is used in an
is
check). - #3784: Code completion should now include members that can be overridden more reliably.
- #3440: New packages added to
pubspec.yaml
should now be available more reliably after saving and waiting for the *pub get
command to complete. - #3438: Fetching packages in a Flutter project should no longer intermittently result in the
flutter_gen
package failing to resolve.
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!