Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

New Quick Assist Items in Latest Dart Editor Build

A new Dart Editor build is available at www.dartlang.org/editor

This build introduces a couple of quick assist items.

The first assist item lets you combine an 'if' statement with an inner 'if' statement. Place the cursor over the starting if, press cmd-1, and hit return. That converts the following code:

  if (!(object is Person)) {
    if (object.name.beginsWith('R')) {
      nextItem = object.name;
    }
  }

to this:

if (!(object is Person) && object.name.beginsWith('R')) {
  nextItem = object.name;
}

The other quick action converts (!(item is A)) to (item is! A) format:

Place cursor over is, press cmd-1, and hit Return to convert to to is! format


Eric Clayberg fills us in on the changes introduced in this build:
  • Opening type from omni box opens corresponding file.
  • F3 works for URL in import/export directives.
  • Search View: Show next/previous search result actions.
  • Search View: Show type references as part of the first field in declaration.
  • DND in Files view restored, will update URLs in/to moved unit.
  • New Quick Assist to Join 'if' statement with inner 'if' statement
  • New Quick Assist to convert '!(x is A)' into 'x is! A'.
  • New Quick Fix to add 'package:' import.
  • Fix for ‘library’ directive highlighting when there is leading Dartdoc.
  • Fewer false positives in new analysis engine.
  • Additional warnings and errors enabled in new analysis engine.
  • Many general improvements and fixes to new analysis engine.
      Breaking Change List:
  • Directory.current is now a getter

As always, view the changelog for the full list of changes, and to get started with the Editor see our tutorial.