Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

To create a new Dart project, click

Create New Project
span
classshortcut
Wiki Markup
{span:class=shortcut}Create New Project{span}
on the IDE Welcome screen and select Dart
span
classshortcut
Wiki Markup
{span:class=shortcut}Dart{span}
from the project types on the left.

...

To open an existing Dart project, click

Open Directory
span
classshortcut
Wiki Markup
{span:class=shortcut}Open Directory{span}
on the IDE Welcome screen. Alternatively, if your project is stored in GitHub, git, or another VCS, cliсk Check out from Version Control
span
classshortcut
Wiki Markup
{span:class=shortcut}Check out from Version Control{span}
.

Then proceed with enabling Dart support and configuration.

...

The configuration dialog is available in

span
classshortcut
Settings
span
classshortcut
Languages & Frameworks
Dart
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Languages & Frameworks{span}
Wiki Markup
{span:class=shortcut}Dart{span}
:

Edit the path to the SDK location on your machine. You can download the latest Dart SDK from http://dartlang.org.
If the SDK was downloaded together with Dart Editor, the path to Dartium is added automatically. You can configure command-line options and a custom user data directory for Dartium by clicking

Settings
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
.

Managing packages and assets

...

Note that copies of the packages folder are automatically excluded from the project. Only the root packages folder (next to pubspec.yaml file) remains visible. To see the excluded directories, go to

span
classshortcut
Settings
span
classshortcut
Project
Directories
span
classshortcut
Wiki Markup
{span:class=shortcut}Settings{span}
Wiki Markup
{span:class=shortcut}Project{span}
Wiki Markup
{span:class=shortcut}Directories{span}
.

Open in Dartium

To preview your project in Dartium:

  • Select

    ...

    classshortcut

    ...

    classshortcut

    ...

    • Wiki Markup
      {span:class=shortcut}Open in Browser{span}
      Wiki Markup
      {span:class=shortcut}Dartium{span}
      from the context menu of your project html file:

    • OR, click the Dartium icon at the top righthand corner in the editor:

    The browser will start and the page will open.

    ...

    To run your application in another browser, select

    span
    classshortcut
    Open in Browser
    your browser
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Open in Browser{span}
    Wiki Markup
    {span:class=shortcut}your browser{span}
    from the context menu of your project html file. WebStorm will automatically run Dart's pub serve command and open a browser with your app running.

    ...

    Dart code can be executed only in Dartium browser. Make sure that Dartium with the JetBrains IDE Support extension is installed and set up in

    span
    classshortcut
    Settings
    span
    classshortcut
    Languages & Frameworks
    Dart
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Settings{span}
    Wiki Markup
    {span:class=shortcut}Languages & Frameworks{span}
    Wiki Markup
    {span:class=shortcut}Dart{span}
    .

    Select Debug file from the context menu of your html file which references the Dart file you want to debug. WebStorm will automatically start the debugging session with Dartium:

    ...

    To run DartUnit tests, you need to create and then run a new Run configuration. In the context menu of the test file, select

    Create run configuration
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Create run configuration{span}
    and then select Test
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Test{span}
    :

    You can run this configuration from the test file context menu. Alternatively, select this new configuration at the top righthand corner of the IDE window and click

    Run
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Run{span}
    .