Dart SDK

The Dart SDK has the libraries and command-line tools that you need to develop Dart apps. To learn about other tools you can use for Dart development, see Dart Tools.

Install the SDK

As the following instructions show, you can use a package manager to easily install and update the Dart SDK. Alternatively, you can build the SDK from source or download the SDK as a zip file.

Choose one of these options:

Install using Chocolatey

To use Chocolatey to install a stable release of the Dart SDK, run this command:

C:\> choco install dart-sdk

To install a dev release, run this command:

C:\> choco install dart-sdk --pre

To upgrade the Dart SDK, run this command (add --pre to upgrade the dev release):

C:\> choco upgrade dart-sdk

Install using a setup wizard

Alternatively, use the community-supported Dart SDK installer for Windows. You can use the wizard to install stable or dev versions of the Dart SDK.

Windows Dart Setup Wizard

If you’re using Debian/Ubuntu on AMD64 (64-bit Intel), you can choose one of the following options, both of which can update the SDK automatically when new versions are released.

Install using apt-get

Perform the following one-time setup:

$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
$ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'

Then install the stable release of the Dart SDK:

$ sudo apt-get update
$ sudo apt-get install dart

Or, to install the dev release of the Dart SDK, run the one-time setup commands followed by:

$ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
$ sudo apt-get update
$ sudo apt-get install dart

Install a Debian package

Alternatively, download Dart SDK as Debian package in the .deb package format.

Modify PATH for access to all Dart binaries

After installing the SDK, add its bin directory to your PATH. For example, use the following command to change PATH in your active terminal session:

$ export PATH="$PATH:/usr/lib/dart/bin"

To change the PATH for future terminal sessions, use a command like this:

$ echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.profile

Install homebrew, and then run:

$ brew tap dart-lang/dart
$ brew install dart

To install a dev channel release, use --devel:

$ brew install dart --devel

Upgrade

To upgrade when a new release of Dart is available run:

$ brew upgrade dart

To install a stable channel release when a dev release is currently active, run:

$ brew unlink dart
$ brew install dart

To upgrade to a dev channel release when a stable release is currently active, run:

$ brew upgrade dart --devel --force

Switch release

To switch between locally installed dart releases run brew switch dart <version>. Examples:

$ brew switch dart 1.24.3
$ brew switch dart 2.0.0

If you aren’t sure which versions of dart you have installed, then run:

$ brew info dart

The command output lists the latest stable and dev versions at the top, followed by your locally installed versions.

What’s in the SDK

The Dart SDK includes a lib directory for the Dart libraries and a bin directory that has these command-line tools:

dart
The standalone VM
dart2js
The Dart-to-JavaScript compiler (used only for web development)
dartanalyzer
The static analyzer
dartdevc
The Dart development compiler (used only for web development)
dartdoc
The API documentation generator
dartfmt
The Dart code formatter
pub
The Dart package manager

For more information about the SDK, see its README file.

About release channels and version strings

The Dart SDK has two release channels:

  • stable channel: stable releases, updated no more frequently than every 6 weeks; currently [calculating].
  • dev channel: pre-releases, usually updated 1/week; currently [calculating].

Stable channel releases of the Dart SDK have version strings like 1.24.3 and 2.0.0. They consist of dot-separated integers, with no hyphens or letters.

Dev channel releases of the Dart SDK (pre-releases) have additional characters, starting with a hyphen (-). For example, Dart 2 pre-releases have version numbers starting with 2.0.0-dev such as 2.0.0-dev.69.5.

For more information, see the Dart 2 page.

Filing bugs and feature requests

To see existing issues or create a new one, go to dartbug.com. Here are some handy searches: