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

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

v3.6.0 2019-11-01

Improved DevTools Integration

#1935/#1323/#1982/#1557: Integration with DevTools has had several improvements.

If an existing DevTools window is no longer connected to a debug session, launching again from VS Code will reuse that window in preference to spawning a new window. If an existing window is connected to the same debug session, launching again from VS Code will show a notification that will bring the existing DevTools window to the front when clicked.

Port numbers are now more predictable, starting at 9100 and increasing if that port is already taken (previously random port numbers would be chosen).

The debug toolbar has a dedicated button to launch the Flutter Widget Inspector. If you already have DevTools open and connected to the same debug session, it will navigate that window to the Inspector page rather than spawn a new window.

A new setting dart.openDevTools controls automatic launching of DevTools when you start a debug session.

The possible values are:

This setting can also be set at a workspace level (should you wish to apply it only to specific projects) and will reuse existing windows as described above.

Flutter

#2043: iOS Simulator names will once again be displayed in the status bar/device picker instead of the generic iOS Simulator label.

Preview: Flutter Gutter Icons and Colors

A new setting dart.previewFlutterGutterIcons has been added to enable the following gutter icons. If no issues are reported, these will be enabled by default in the next version.

#807/#2040: Flutter icon previews will appear in the gutter where they a re referenced.

#2039/#2042: Flutter colour previews will now appear in the gutter of the editor for built-in Flutter colors and calls to the Color constructor.

Editor

#2011: Closing labels will now update more quickly during typing. Previously a half-second delay was used to reduce the chance of them appearing in the wrong position during edits, but this is no longer required.

#2076: A new setting dart.enableMachineLearningCodeCompletion has been added to opt-in to the machine-learning backed code completion preview. Enabling this is equivilent to adding --enable-completion-model to the dart.analyzerAdditionalArgs setting.

#2067/#2046: Deprecated symbols will now be visually struck out in completion lists and in the code editor.

#1963: Deprecated symbols will be struck out in the Outline view.

Testing

#1871/#2060: A new command (which you can key-bind in the VS Code settings) has been added to jump between a file and its corresponding test file in the editor. This command will map lib/foo.dart to test/foo_test.dart and back. The command is only available when the current file can be mapped and the target file exists.

#2080: Opening a test file before restoring packages should no longer result in Code Lens action links not appearing for that file or tests failing to appear in the test tree after running.

#2055/#2053/#2054: Tests with quotes in their names can now be executed from the test tree, and also show test Code Lens action links.

Commands

Debugger

Fork me on GitHub