RubyMine supports developing, running, and debugging Dart web and command-line applications. RubyMine recognizes
*.dart files and marks them with the icon.
When the Dart support is enabled, RubyMine provides full coding assistance, which involves code completion, error and syntax highlighting, code inspections and quick-fixes, search and navigation, refactoring, and much more. RubyMine also integrates with the pub tool and the Dart Analysis Server.
Downloading the Dart tools
To have all the tools for developing both command-line and web Dart applications:
- Download and install the Dart SDK.
The Dart SDK incorporates the Dart Virtual Machine, the Dart Libraries, as well as all the command line tools, including compilers (dart2js and dartdevc) and the pub tool.
- For web development, optionally download the Dartium browser.
Learn more about the Dart development tools from the Dart Official website.
Configuring Dart support in a RubyMine project
You can create a RubyMine project with Dart-specific structure from a Stagehand template or add Dart support in an existing RubyMine project.
- Choose on the main menu or click Create New Project on the Welcome screen. The New Project Dialog opens.
- In the left-hand pane, choose Dart.
- In the right-hand pane, specify the project name and the path to the folder where the project-related files will be stored.
- Specify the paths to the Dart SDK and optionally to the Dartium executable file (Windows and Linux)/Dartium application (macOS). RubyMine detects and displays the Dart version.
- To have a sample application created in the project, select the Generate sample content check box and choose the relevantStagehand template from the list below. If you clear the check box, RubyMine creates and empty project.
- Click Create. RubyMine sets up the project structure and generates some sources based on the selected Stagehand template.
- Open the Dart page ( for Windows and Linux or for macOS).
- Select the Enable Dart support for the project <project name> check box.
- In the Dart SDK Path text box, specify the location of the downloaded Dart SDK. Type the path manually or click and choose the path in the dialog box that opens. If RubyMine recognizes the Dart SDK correctly, its revision number is displayed in the Version read-only field.
- For Dart web development: optionally specify the location of the Dartium executable (Windows and Linux)/Dart application (macOS). Type the path manually or click and choose the path in the dialog box that opens. Learn more about Dart web tools from the the Dart Official website,
Adding a Dart project (package) to a RubyMine project
If your application consists of several Dart projects (packages), you can develop all of them within one RubyMine project. To attach a Dart project (package) to an existing RubyMine project you need to add its root folder as a content root.
- Open the Directories page ( for Windows and Linux or for macOS).
- In the right-hand pane with a list of existing content roots, click Add Content Root. Then in the dialog box that opens, choose the root folder of the Dart project (package) to be attached.