Contents

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 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.

Platformx64IA32 (x86)Arm32Arm64RISC-V (RV64GC)OS Versions
Windowsverifiederrordangerousverifieddo_not_disturb_on10, 11
LinuxverifiederrorverifiedverifiedverifiedDebian stable,
Ubuntu LTS under standard support
macOSverifieddangerousdo_not_disturb_onverifieddo_not_disturb_onLatest three versions of macOS:
Sonoma (14), Ventura (13), Monterey (12)

verified Supported on all channels.
error Support is deprecated and might be dropped in a future Dart release.
dangerous Unsupported on all channels.
do_not_disturb_on Unsupported by the operating system.

Choose an installation option

#

To install and update the Dart SDK from the stable channel, choose one of the following options:

  1. Use a package manager (Recommended).

  2. Use a Dart Docker image.

  3. Install Flutter.
    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.

  4. Download a ZIP archive from the SDK Archive.

  5. Build the SDK from source.

Install the Dart SDK

#

To install the Dart SDK, use the appropriate package manager for your development platform.

To upgrade the Dart SDK, run the same command to install the Dart SDK from your package manager.

Install using Chocolatey

#

To install the Dart SDK, use Chocolatey. Chocolatey requires elevated permissions.

  1. Install Chocolatey.

  2. Launch PowerShell with elevated permissions.

    PS 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.

PS 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:

  1. In the Windows search box, type env.
  2. Click Edit the system environment variables.
  3. Click Environment Variables....
  4. In the user variable section, select Path and click Edit....
  5. Click New, and enter the path to the dart-sdk directory.
  6. 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, use the following command.

PS C:\> choco upgrade dart-sdk

Uninstall using Chocolatey

#

To uninstall the Dart SDK, perform the following steps.

  1. Launch PowerShell with elevated permissions.

  2. Use the following command.

    PS C:\> choco uninstall dart-sdk
  3. Remove the Dart configuration files from your home directory.

    PS C:\> Remove-Item -Recurse -Force ^
         -Path $env:LOCALAPPDATA\.dartServer,$env:APPDATA\.dart,$env:APPDATA\.dart-tool

Install using a Linux package manager

#

You have two options to install the Dart SDK on Ubuntu or Debian:

  • Use the apt-get command.
  • Download a .deb package and run the dpkg command.

Install using the apt-get package manager

#

To install Dart with apt-get, perform the following steps. You need steps 1 to 3 only for the first install.

  1. Update the package index files and install the secure HTTP package.

    $ sudo apt-get update && sudo apt-get install apt-transport-https
  2. 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
  3. 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
  4. Use the following sudo apt-get commands.

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

Install as a Debian package

#

To install the Dart SDK as a Debian package (*.deb), perform the following steps.

  1. Download the Dart SDK Debian package.

  2. Use the sudo dpkg command to install the *.deb package.

    $ sudo dpkg -i dart_3.4.0-1_amd64.deb

    Substitute dart_3.4.0-1_amd64.deb with the current filename.

Upgrade the Dart SDK

#

Use the same command that you used to install the SDK.

Upgrade using apt-get

#

If you installed the Dart SDK with apt-get, use the following sudo apt-get commands.

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

Upgrade using dpkg

#

If you installed the Dart SDK with dpkg, use the sudo dpkg command.

$ sudo dpkg -i dart_3.2.6-1_amd64.deb

Substitute dart_3.4.0-1_amd64.deb with the new upgrade's filename.

Uninstall the Dart SDK

#

Uninstall using apt-get

#

If you installed the Dart SDK with apt-get, use the sudo apt-get remove command.

  1. Use the sudo apt-get remove command.

    $ sudo apt-get remove -y dart
  2. Remove the Dart configuration files from your home directory.

    $ rm -rf  ~/.dart*

Uninstall using dpkg

#

If you installed the Dart SDK with dpkg, use the sudo dpkg --purge command.

  1. Use the sudo dpkg --purge command.

    $ sudo dpkg --purge dart

    This removes the configuration files at the same time.

  2. Verify the SDK has been removed.

    $ dpkg -l | grep dart

Install using Homebrew

#

To install the Dart SDK, use Homebrew.

  1. Install Homebrew if needed.

  2. Add the official tap.

    $ brew tap dart-lang/dart
  3. 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:

  1. Install the version to which you want to switch.

    For example, to install Dart 3.1:

    $ brew install dart@3.1
  2. 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

Uninstall using Homebrew

#

To uninstall the Dart SDK, use Homebrew.

  1. Uninstall the Dart SDK.

    $ brew uninstall dart
  2. Remove the Dart configuration files from your home directory.

    dart
    rm -rf  ~/.dart*

Release channel reference

#

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 building and deploying production apps.

Stable channel release version strings follow a x.y.z format:

  • x : major version
  • y : minor version
  • z : 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 once a month. The current beta version is [calculating].

Use beta channel releases for testing your app's compatibility with future stable versions.

Beta channel release version strings follow a x.y.z-a.b.beta format:

  • x : major version
  • y : minor version
  • z : patch version
  • a : pre-release version
  • b : 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 twice a week. The current dev version is [calculating].

Use dev channel releases for testing recent fixes and experimental features.

Dev channel release version strings follow a x.y.z-a.b.dev format:

  • x : major version
  • y : minor version
  • z : patch version
  • a : development version
  • b : 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.