WebStorm 6.0.1 Web Help

6.0+

WebStorm supports developing and running Dart source code. WebStorm recognizes *.dart files, and allows you to edit them providing full range of coding assistance. Dart files are marked with the icon_dart.png icon.

To run and debug your code you will need it translated into JavaScript, which requires a transpiler.

In this section:

Preparing for Dart development
  1. Download the Dart SDK.
  2. Make sure the Dart plugin is enabled. The plugin is bundled with WebStorm and activated by default. If it is not, enable the plugin.
  3. To configure the Dart SDK in WebStorm, click the Dart Settings button icon_dart.png on the toolbar. The Dart Settings dialog opens.
    1. In the Choose Dart SDK Home Path text box, specify the location of the downloaded Dart SDK. Type the path manually or click the Browse button browseButton.png and choose the path in the dialog box that opens.

      If WebStorm recognizes the Dart SDK correctly, it displays the revision number of the detected SDK.

    2. To activate the SDK, select the Dart SDK enabled check box.
    3. If applicable, change the scope of the SDK. Click the Edit usage scope link and update the default settings in the Usage Scope dialog box that opens. By default the SDK is used at the WebStorm level.

Coding assistance

With the Dart development support is enabled, WebStorm provides full coding assistance which involves:

  • Code completion for keywords, labels, variables, parameters and functions.
  • Error and syntax highlighting.
  • Code formatting and folding.
  • Numerous code inspections and quick-fixes.
  • Refactoring:
    • Common refactoring procedures, such as extract method , inline, rename/move, etc.
    • Dart-specific refactoring procedures, such as change signature, extract parameter, extract variable. These types of refactoring are identical with JavaScript, for more details, see the section JavaScript-Specific Refactorings
  • Code generation:
    • Generating code stubs based on file templates during file creation.
    • Possibility to create line and block comments (Ctrl+Slash; Ctrl+DivideCtrl+Slash; Ctrl+Divide/Ctrl+Shift+Slash; Ctrl+Shift+DivideCommand Shift Slash; Command Shift Divide; Command Shift Slash; Command Shift Divide).
  • Navigation and search through the source code:
    • Navigating with Structure View.
    • Navigate | Declaration (Ctrl+BCtrl+B).
    • Navigate | Implementation (Ctrl+Alt+BCtrl+Alt+B) from overridden method / subclassed class.

See Also

Language and Framework-Specific Guidelines:

Reference:

External Links:

Web Resources: