In this section:
- Dart Support
- Preparing for Dart Development
- Using Integration with the Pub Tool
- Using Integration with the Dart Analysis Server
- Running and Debugging Dart Applications
- Testing Dart
Before you start Dart development, install and enable the Dart plugin. The plugin is not bundled with IntelliJ IDEA, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.
IntelliJ IDEA supports developing, running, and debugging Dart code. IntelliJ IDEA recognizes
*.dart files, and allows you to edit them providing full range of coding assistance. Dart files are marked with the icon.
Dart is intended for developing Web and command-line applications. IntelliJ IDEA supports both workflows.
- For running and debugging Dart command-line applications, IntelliJ IDEA provides a dedicated run/debug configuration of the type Dart Command Line Application.
With the pub tool, the compilation is performed through the pub serve action using the built-in dart2js compiler.
When the Dart development support is enabled, see Preparing for Dart Development, IntelliJ IDEA 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.
- Integration with the native Dart static analysis engine: all inconsistencies and potential problems are reported in the dedicated Dart Analysis Tool Window with the possibility to navigate to the fragment of the source code where the problem was detected.
- Common refactoring procedures, such as extract method , inline, rename/move, etc.
- Dart-specific refactoring procedures, such as change signature, extract parameter, extract variable.
- Code generation:
- Generating code stubs based on file templates during file creation.
- Ability to create line and block comments (Ctrl+Slash/Ctrl+Shift+Slash).
- Navigation and search through the source code:
- Navigating with Structure View.
- (Ctrl+Alt+B) from overridden method / subclassed class.