- #3060/#3100: The Run/Debug Failed context menu items are now available on group nodes in the test tree in addition to suite notes.
- #3093: Test suites should no longer be re-sorted during runs causing them to move around. If their status changes to failed, they will still be promoted to the top.
- #3058: The “Run All Tests” command now correctly removes stale tests after completing (for example, tests that had been renamed).
- #3052: Test Discovery should no longer result in duplicate nodes in the test tree on Windows.
- #3038: Skipped tests can now be hidden from the test tree.
- #3049/#3053: A new command Clear Test Results removes all test results from the test tree until they are next run/discovered.
- #3050/#3084: New toolbar buttons and a menu have been added to the top of the test tree for running tests, clearing test results and for toggling visibility of hidden tests.
- #3094: Test icons have been (slightly) updated.
LSP Semantic Tokens
#2202: LSP’s Semantic Tokens are now supported by Dart Code. In order to use semantic tokens you need:
- Dart Code v3.19.0 or later
- To have the LSP Preview enabled (see the
- A Dart SDK v2.12 or later or a Flutter SDK containing the same (these changes are not in the stable channels at the time of the Dart Code release)
Semantic tokens fix a number of inconsistencies in syntax highlighting that were not easily addressed using the original textmate grammar. Below is a screenshot comparing the original colouring (left) and new colouring (right).
Some specific issues this addresses:
- #2241: Allow highlighting unknown/invalid types differently to known types.
- #2237: Allow variables to be themed.
- #1900: Allow changing the color of named parameter labels in themes.
- #1688: Allow coloring different types of variables/fields differently in themes.
- #311: Variable names starting with uppercase characters should not be coloured as types.
- #2748: Methods named
set are incorrectly colored as keywords.
Items here and in subsequent sections marked “(requires SDK update)” rely on changes in the Dart/Flutter SDKs so may not be immediately visible depending on your Dart/Flutter SDK channel (these changes are not in the stable channels at the time of the Dart Code release).
- #2761: Imports are now updated when moving/renaming files when using LSP. This is currently only supported for single-file moves/renames (requires SDK update).
- #3081: Flutter gutter icon previews no longer sometimes fail to render the first time you open a file.
- #3079: Flutter UI Guides no longer sometimes fail to render the first time you open a file.
- #2951: The “Extract Local Variable” refactor is now available for LSP (requires SDK update).
- #2653: Holding
Ctrl when hovering over a symbol will now show the correct code preview in the hover popup.
- #2896: Flutter icon previews now show up in completion and hovers for LSP.
- #3045: The Enable <platform> entries in the device picker now show up for platforms for which there are available emulators, even if there are no active devices. For example, Enable Android will show up if your current project is missing its Android folder/dependencies if you have Android emulators, even if you have no active Android devices.
- #3034: On Flutter’s first run, when the Initializing Flutter… notification appears, output will be streamed to the output window to make it clearer what’s happening and/or why it’s taking a long time.
- #3022: Platform-specific options are now hidden when that platform is disabled, for example with
flutter config --no-enable-android (requires Flutter SDK update).
- #3020: If the Flutter SDK’s
version file changes while the analyzer is running, you’ll now be prompted to restart it using the new SDK version.
- #2973: Code completion will no longer sometimes stop returning most results after running a Flutter app on Windows (requires SDK update).
- #3067: Cupertino icon previews now show in code completion/hovers in addition to Material icons.
- #3066: Icon variants (such as outlined, rounded) now correctly render previews.
- #3030: Multi-line TODO comments are now supported when subsequent lines are indented by an extra space (requires SDK update).
- #2800: Comments that span multiple lines can now be collapsed using code folding (requires SDK update).
- #2982: Code completion no longer fails to suggest type names after the word
static in class field definitions (requires SDK update).
- #3064: DevTools can now be started without an active debug session, allowing you to connect to an application not launched from VS Code.
- #3063: The Open DevTools command is now listed in the Flutter category in addition to Dart.
The following items rely on changes in the Flutter SDK and DevTools so may not be immediately visible depending on your Flutter SDK channel (these changes are not in the stable channels at the time of the Dart Code release).
- #3086: VS Code now shares its DevTools instance with Flutter to support deep linking.
- #3088/#3087: Some types of Flutter widget errors (initially render overflow errors) will trigger warning notifications including a quick way to inspect the erroring widget.
- #3033: Hot-reload-on-save no longer fires for Save events triggered by VS Code’s auto-save feature. Pressing Save manually will still trigger a reload even if there are no unsaved changes.
- #2974: The debuggers request for the top stack frame is now satisfied using the VM pauseEvent’s topFrame, reducing latency when the debugger breaks; this is a performance optimisation that mostly affects web.
- #3046: @kagouda updated references to the Flutter: New Project command in docs to the new name Flutter: New Application Project.
- #2824: The build_runner tasks have been added to the Tasks page with a link to build_runner documentation.