VS Code extension v2.26.0: Auto-import code-completion, improved dependencies tree...

616 views
Skip to first unread message

Danny Tuppeny

unread,
Apr 26, 2019, 11:18:03 AM4/26/19
to Flutter Dev

Hey all,

v2.26.0 is now available. Release notes below (and online here).

Auto-Importing from Code Completion

#1060: Code completion now lists symbols that are not yet imported and will auto-import the required library when selected.

Items will show “Auto import from xyz” in their details when this will occur.

The import will be added once the selected item is committed. This also works for part files, where the import will be added to the relevant parent file.

This behaviour can be disabled with the dart.autoImportCompletions setting.

Improved Dependencies Tree

The dependencies tree has been updated and improved. It’s now (#1591) be available for workspaces that have multiple projects (either in sub-folders, or as part of a multi-root workspace), (#1622) sorts folders above files and (#1621) no longer shows projects in their own dependencies list.

Flutter Changes

  • #1634: A race condition that caused devices not to be detected has been resolved.
  • #1593: The prompt to install the Flutter extension when opening a Flutter project has been streamlined and can install the extension for you instead of just linking to the marketplace.
  • #1629: A new command Flutter: Toggle Check Elevations has been added to toggle highlighting invalid elevations.
  • #1602: Running without debugging no longer stops some Flutter functionality (such as debug toggles) from functioning.
  • #1574: Progress notifications will now appear more quickly when launching Flutter applications.

Debugger Changes

  • #1566: Adding breakpoints in SDK files while debugging will no longer throw errors.
  • #1540: The Hot Reload button on the debug toolbar (and Touch Bar) is now placed next to the Restart button.

Editor Changes

  • #1625: Flutter snippets now appear in completion for Flutter projects that are in sub-folders of the main workspace.
  • #1598: Creating projects with Stagehand will no longer sometimes end with the VS Code explorer pane showing a stale file list.
  • #1594: Switching between SDKs will no break some functionality inside files that were already open.
  • #1573/#1635: More improvements have been made to syntax highlighting of comments.
  • #1570: The “Ignore hint xxx” quick-fixes (enabled with dart.showIgnoreQuickFixes) will now appear at the bottom of the Code Actions list.
  • #1563: Documentation tooltips will be positioned more appropriately for Widget constructor calls that span many lines.
  • #1555: Diagnostic errors in the Problems list have more detailed descriptions of how to resolve them.
  • #1444@macro declarations in tooltips will now be resolved to the correct values (when using a recent enough version of the SDK).

Other Changes

  • #1637pub get will now run for pubspec.yaml changes made even outside of VS Code. For example, if you switch Git branch and the pubspec is modified, packages will be fetched automatically.
  • #1538: DevTools now defaults to the dark theme. This can be changed with the dart.devToolsTheme setting.
  • #1450pub get will automatically run immediately after creating stagehand projects.
  • #1633: Update notifications are no longer shown after the first install.
  • #1604: The Hot Reload buttons/commands will no longer show up when running a Flutter project without Hot Reload support.
  • #1640: A new setting has been added (dart.flutterHotRestartOnSave) that will enable running Hot Restart on save when running a Flutter project without Hot Reload support.
  • #1600: Enabling the (diagnostic) Analyzer observatory port will no longer result in an error showing in the console.
  • #1599: Optional settings are now defined as such so that editing them in the VS Code Settings UI does not update them to default values for the data type (such as 0 or "").
  • #1618: Notifications for Dart DevTools will no longer be shown when running tests.

Christopher Bagge

unread,
Apr 26, 2019, 3:14:47 PM4/26/19
to Danny Tuppeny, Flutter Dev
Can someone help me out here

I was very exited to read about these new features; however I am not having much luck using them.

I went as far as uninstalling the DART extension and installed it again, and I do see the referenced user setting to disable auto-import; mine is enabled but I don't see any auto import also Flutter: Toggle Elevations is missing

Actually as I am looking through the DART commands I should have available to me in VS Code I am missing others as well. For instance Dart: Organize imports.

If I do Dart: Change SDK the location is c:\src\flutter\bin\cache\dart-sdk and the version file has the following in it.

2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36

Looks like this file didn't change since I downloaded flutter SDK.

Dart and flutter both seems to work just fine in VS Code not sure if I am missing something

I am on windows 10

Thanks,
Chris




--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danny Tuppeny

unread,
Apr 26, 2019, 4:15:58 PM4/26/19
to Christopher Bagge, Flutter Dev
On Fri, 26 Apr 2019 at 20:14, Christopher Bagge <bagg...@gmail.com> wrote:
I went as far as uninstalling the DART extension and installed it again, and I do see the referenced user setting to disable auto-import; mine is enabled but I don't see any auto import also Flutter: Toggle Elevations is missing 

Actually as I am looking through the DART commands I should have available to me in VS Code I am missing others as well. For instance Dart: Organize imports.

If I do Dart: Change SDK the location is c:\src\flutter\bin\cache\dart-sdk and the version file has the following in it.

2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36

Well this is a little embarrassing. I missed a key piece of information in the release notes (I'll go update). Both the new features you mention rely on changes made in the SDK. These changes have not yet made it to the Flutter stable channel, so you'll need to use the dev (or maybe beta) channel or wait for them to make a stable release.

The other command - Organize Imports - is now a first class command in VS Code, so it's not prefixed with "Dart" in the command list. If you saw it written somewhere with that prefix, let me know so I can update.

Thanks!

Christopher Bagge

unread,
Apr 26, 2019, 4:23:20 PM4/26/19
to Danny Tuppeny, Flutter Dev
Thank you I appreciate the quick response.

Here is the link to the organize imports


Chris


Reply all
Reply to author
Forward
0 new messages