Get the Dart SDK
This page describes how to download the Dart SDK. The Dart SDK has the libraries and command-line tools that you need to develop Dart command-line, server, and non-Flutter web apps. For details, see the Dart SDK overview.
As of Flutter 1.21, the Flutter SDK includes the full Dart SDK. So if you have Flutter installed, you might not need to explicitly download the Dart SDK. Consider downloading the Dart SDK if any of the following are true:
- You don’t use Flutter.
- You use a pre-1.21 version of Flutter.
- You want to reduce disk space requirements or download time, and your use case doesn’t require Flutter. For example, you might have a continuous integration (CI) setup that requires Dart but not Flutter.
Installing the Dart SDK
As the following instructions show, you can use a package manager to easily install and update a stable channel Dart SDK. Alternatively, you can build the SDK from source or install from any release channel by downloading the SDK as a zip file.
You can install the Dart SDK using Chocolatey.
To install the Dart SDK:
C:\> choco install dart-sdk
To upgrade the Dart SDK:
C:\> choco upgrade dart-sdk
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 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' $ sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
Then install the Dart SDK:
$ sudo apt-get update $ sudo apt-get install dart
Install a Debian package
Alternatively, download Dart SDK as Debian package
.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 the following commands:
$ brew tap dart-lang/dart $ brew install dart
To upgrade when a new release of Dart is available:
$ brew upgrade dart
To switch between locally installed Dart releases, use
brew switch dart <version>. Example:
$ brew switch dart 2.10.1
To see which versions of Dart you’ve installed:
$ brew info dart
About release channels and version strings
The Dart SDK has three release channels:
Stable channel: stable releases, updated roughly every three months; currently
Stable releases are suitable for production use.
Beta channel: preview releases, usually updated every month; currently
Beta channel builds are preview builds for the stable channel. We recommend testing, but not releasing, your apps against beta to preview new features or test compatibility with future releases.
Dev channel: prereleases, usually updated twice a week; currently
Dev channel releases are the most current with latest changes, may be broken, are unsupported, and may contain unvetted breaking changes.
Stable channel releases of the Dart SDK have
x.y.z version strings like
2.1.0. They consist of dot-separated integers, with no hyphens or
x is the major version,
y is the minor version, and
the patch version.
Beta and dev channel releases of the Dart SDK (non-stable releases) have
x.y.z-a.b.<beta|dev> versions like
2.8.0-20.11.beta. The part before the
hyphen follows the stable version scheme,
b after the hyphen are the
prerelease and prerelease patch versions, and
dev is the channel.