How to install dart sdk on mac

You can install dart SDK on Mac using homebrew. If you have homebrew installed, then you can skip step 1. Else, follow along our instructions to set up dart SDK on your Mac :

Step 1: Install homebrew :

Homebrew is the must-have package manager for macOS. Open one terminal and paste the below command:

/usr/bin/ruby -e "$(curl -fsSL"

You can check site to check the updated command.

To confirm that brew is installed, open the terminal, enter brew and hit enter. It will produce one output like below :

Install dart sdk brew

Step 2: Install dart SDK :

Enter the below two commands to install dart sdk :

brew tap dart-lang/dart
brew install dart

Install dart sdk

It will install the dart sdk on your machine. To check which version is installed, run the below command :

brew info dart

Switching between development and stable channel :

You can switch to a dev channel using the below command :

brew install dart -- --devel

devel is used for the dev branch.

Switch to a stable channel :

brew unlink dart
brew install dart

Upgrade to the next release :

brew upgrade dart

Upgrade to dev when stable is active :

brew upgrade --force dart -- --devel

You can also install multiple releases and switch between them easily like below :

brew switch dart <version_no>

That’s it. Dart SDK is used to develop web, server-side and command-line applications. If you are developing flutter apps, no need to install dart SDK, it is already included with the flutter app.