For instructions on installing the Dart or Flutter extensions, go here.
v3.40.0 2022-05-02
Flutter
- #3913: Previews for Flutter icons that begin with reserved terms (like
try
,class
,new
,switch
) now appear correctly in Dartdocs. - #3912: When the
flutter
tool is run for the first time by the extension, the Output pane containing welcome text will remain visible instead of closing automatically.
Debugger
- #3937: The Debug: Select & Start Debugging command now includes a launch configuration for each available device. Clicking the cog icon will create a specific launch configuration in
launch.json
for that specific device, regardless of the current selected device. - #3918: Hot Restart no longer sometimes causes errors to be written to the VS Code developer console when an application has more than one isolate.
Commands
- #3924: The setting
dart.flutterCreateOffline
has been renamed todart.offline
and now passes--offline
to other commands (such aspub get
) in addition toflutter create
. - #3920: A new setting
dart.devToolsLocation
replacesdart.embedDevTools
to configure where DevTools should be launched. The default setting"beside"
behaves the same as the previous embedding (opening in a tab beside the current editor)."active"
open over the top of the current editor (which can be full-width)."external"
opens in an external browser window.
Other
- #3922:
file:///
links for Dart files in the embedded terminal are now detected more reliably and should not lead to “Invalid file path” errors after clicking. - #3938: Activations of the Dart extension in workspaces that do not contain Dart/Flutter projects (such as when VS Code requests dynamic debug configs while working on another project) will no longer trigger Dart SDK update notifications.
- #3919: Opening a project with no
pubspec.yaml
will no longer suppress the notification if a Dart SDK cannot be found. - #3933: The
dart-lang/sdk
repo is again detected correctly, disabling automaticpub get
and related commands.
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/dev channels that already include the SDK parts of these changes).
Server-Provided Code Snippets
#3904: When using a new enough SDK, the local code snippets are suppressed and snippets will be provided by the Dart LSP server. Server-provided snippets are contextual and can adapt to your project settings and language version, including:
- #2059: Only snippets that are valid at the current location are shown (for example the
class
orstful
snippets are only shown at the top level, andif
andswitch
are not shown at the top level). - #3347: Nullability suffixes
?
are only included when null saftey is enabled. - #3899: Super parameters may be used when available.
- #3582:
List<String> args
are not included inmain()
functions for test files.
Go to Type Definition
#3833: Go to Type Definition allows navigating to the definition of a type of a symbol without first needing to navigate to the symbols definition.
Flutter
- #3921: When using the new SDK debugger implementations (
dart.experimentalSdkDaps
), detaching from a Flutter process will remove breakpoints and automatically resume. - #3837: The
--multidex
/--no-multidex
flag now works correctly for launches offlutter run
through the VS Code debugger (including defaulting to enabled).
Editor
- #3934: The ordering of diagnostics will now remain stable during typing (where the specific diagnostics do not change) to avoid VS Code’s Peek Error (
F8
) functionality from changing the selected error during typing. - #3932: The
var
keyword is no longer highlighted differently when used in afor
loop for some themes. - #3929: Opening loose
.dart
files that are not part of a project (with apubspec.yaml
oranalysis_options.yaml
) will no longer sometimes cause some “File is not being analyzed” errors during startup. - #3906: Code completion for the named argument
children: []
will no longer insert[]
if completion is invoked on thechildren
label and a value is already present. - #3892: Accepting code completion suggestions should no longer sometimes delete additional characters when the system is under load/slow.
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!