Get the Dart SDK
This page describes how to download the Dart SDK. The Dart SDK includes the libraries and command-line tools that you need to develop Dart command-line, server, and non-Flutter web apps.
To learn more about the Dart SDK, consult the Dart SDK overview.
System requirements
#Dart supports the following hardware architectures and platform versions to develop and run Dart code.
Platform | x86 | x64 | ARM32 | ARM64 | RISC-V | OS Versions |
---|---|---|---|---|---|---|
Windows | verified | verified | dangerous | verified | do_not_disturb_on | 10 (32-bit, 64-bit), 11 |
Linux | verified | verified | verified | verified | verified | Debian stable, Ubuntu LTS |
macOS | dangerous | verified | do_not_disturb_on | verified | do_not_disturb_on | Latest three versions of macOS: Sonoma (14), Ventura (13), Monterey (12) |
verified Supported in all channels.
dangerous Unsupported in all channels.
gpp_maybe Supported in Dev, Beta channels only.
do_not_disturb_on No version exists.
Choose an install option
#To install and update the Dart SDK from the stable channel, choose one of the following options:
- Use a package manager (Recommended).
- Use a Dart Docker image
- Download from the SDK Archive
- Build the SDK from source
If you've installed or plan to install the Flutter SDK, it includes the full Dart SDK. The Flutter SDK includes the dart
CLI tool in Flutter's bin
folder.
Install the Dart SDK using a package manager
#Install the Dart SDK using the package manager for your platform.
Install using Chocolatey
#To install the Dart SDK, use Chocolatey. Chocolatey requires elevated permissions.
Install Chocolatey, then run a command prompt with elevated permissions.
C:\> choco install dart-sdk
Change default install path
#By default, Chocolatey installs the SDK at C:\tools\dart-sdk
. To change that location, set the ChocolateyToolsLocation
environment variable to your desired installation directory.
Verify your PATH includes Dart
#Verify you can run Dart.
C:\> dart --version
Dart SDK version: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "win_x64"
If your development machine doesn't return a Dart version, add the SDK location to your PATH:
- In the Windows search box, type
env
. - Click Edit the system environment variables.
- Click Environment Variables....
- In the user variable section, select Path and click Edit....
- Click New, and enter the path to the
dart-sdk
directory. - In each window that you just opened, click Apply or OK to dismiss it and apply the path change.
Upgrade using Chocolatey
#To upgrade the Dart SDK:
C:\> choco upgrade dart-sdk
Install using package manager
#Choose to install either using apt-get or downloading a .deb
package.
Both methods trigger an SDK update whenever Dart releases a new version.
Install using apt-get
#Perform the following steps for the first install only.
Update the package index files and install the secure HTTP package.
$ sudo apt-get update && sudo apt-get install apt-transport-https
Download and add the Google Linux GPG public key.
$ wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg
Add the Dart package repository to your Linux system.
$ echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
Install the Dart SDK using sudo
.
$ sudo apt-get update && sudo apt-get install dart
Install a Debian package
#To install the Dart SDK as a Debian package (*.deb
).
Download the Dart SDK as a Debian package.
Install the
*.deb
package using one of two methods:From a GUI, double-click the
.deb
file.From a terminal, run the following command:
$ sudo dpkg -i dart_3.2.6-1_amd64.deb
Install using Homebrew
#To install the Dart SDK, use Homebrew.
Install Homebrew if needed.
Add the official tap.
$ brew tap dart-lang/dart
Install the Dart SDK.
$ brew install dart
Verify PATH includes Homebrew
#Verify that your PATH
includes the Homebrew bin
directory. Setting up the correct path simplifies using Dart SDK commands such as dart run
and dart format
. To get help configuring your PATH
, consult the Homebrew FAQ.
Upgrade using Homebrew
#To upgrade when a new release of Dart is available:
$ brew upgrade dart
Switch Dart versions
#To switch between locally installed Dart releases:
Install the version to which you want to switch.
For example, to install Dart 3.1:
$ brew install [email protected]
To switch between versions, unlink the current version and link the desired version.
$ brew unlink dart@<old> && brew unlink dart@<new> && brew link dart@<new>
List installed Dart versions
#To see which versions of Dart you've installed:
$ brew info dart
Use release channels and version strings
#Stable channel
#Dart publishes a new release to the stable channel about every three months. The current stable version is [calculating]
.
Use stable channel releases for production environments.
Stable channel release version strings follow a x.y.z
format:
x
: major versiony
: minor versionz
: patch version
Examples of stable channel version strings include 1.24.3
and 2.1.0
.
To install a stable channel release, follow the instructions on this page
Beta channel
#Dart publishes a new release to the beta channel about every three months. The current beta version is [calculating]
.
Use stable channel releases for production environments.
Beta channel release version strings follow a x.y.z-a.b.beta
format:
x
: major versiony
: minor versionz
: patch versiona
: pre-release versionb
: pre-release patch version
Examples of beta channel version strings include 2.8.0-20.11.beta
and 3.3.0-205.1.beta
.
To install a beta channel release, download the SDK as a zip file.
Dev channel
#Dart publishes a new release to the dev channel about every three months. The current dev version is [calculating]
.
Use stable channel releases for production environments.
Dev channel release version strings follow a x.y.z-a.b.dev
format:
x
: major versiony
: minor versionz
: patch versiona
: development versionb
: development patch version
Examples of dev channel version strings include 2.8.0-20.11.dev
and 3.2.12-15.33.dev
.
To install a dev channel release, download the SDK as a zip file.