-
Download the Dart SDK
.
- Make sure the Dart plugin is enabled. The plugin is bundled with WebStorm and activated by default. If it is not, enable the plugin.
-
To configure the Dart SDK in WebStorm, click the Dart Settings button
on the toolbar.
The Dart Settings dialog opens.
-
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
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.
- To activate the SDK, select the Dart SDK enabled check box.
- 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.
-
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
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.
- (Ctrl+BCtrl+B).
- (Ctrl+Alt+BCtrl+Alt+B) from overridden method / subclassed class.
