Education logo

How to Install Dart in MacOS for 2025

A complete step-by-step guide on installing, upgrading, switching between versions, and uninstalling Dart in 2025

By Mohammad Azeem KalwarPublished 12 months ago 3 min read
how to setup dart in 2025

Dart is an opensource, platform independent, object-oriented programming language that is widely used in creating cross platform mobile apps, web apps, and websites with single codebase. It is developed by Google.

In this tutorial, I have mentioned step by step guide on how to get started with dart and write your first code in the programming language.

It is important to highlight that you can run your dart code online on a website called DartPad. You can access the website from following link.

https://dartpad.dev/

This is a free website, and doesn’t require you to login/register to use and run your code on it. When you first open the website, you will see a sample code that you can run and see the result in the console in the right side of the website. A console is a page on the right where you can see the result of the code. You can run the code by pressing a blue button in top center with stating “Run”.

At this point a question might be asked that why it is necessary to install dart on personal computer when one can write dart code online for free. The answer is, the Dart uses its renowned framework called Flutter in software development. To work with that, you must install it on your machine that’s why it is good option to install dart on local machine when you ultimately have to work with flutter after learning the programming basics with dart. However, It is fine to work online with DartPad to practice programming, understand concepts, until you install the flutter.

Following are the steps that you need to follow in order to install dart on your mac computer.

1. Install Homebrew

You need to install Homebrew on your mac if you haven’t done already. To do that just run following command in the terminal app.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After you have the executed the command, check by typing “brew” or “brew help” in the terminal, and if you see like a lot of lines run, then terminal has recognized the brew and that means the brew has been installed successfully.

2. Install the Dart

Next step is to install the dart itself. For that just paste the following command in the terminal.

brew install dart

This will install the dart SDK (Software Development Kit) on your mac computer. To verify the installation, type “dart” in the terminal. If terminal doesn’t return error then dart is installed successfully.

You can check the version of dart installed by typing following command.

dart –version

Remember that dart is case sensitive. It means if you type “Dart –version” instead of “dart –version”, you will encounter an error.

That’s all you need to do to install the dart your mac.

If you want to upgrade your current dart version, use following command.

brew install dart@<enter-new-dart-version-number-here>

When you are working in a company or as freelancer, there is a always a chance that you have to work with multiple dart version. To switch among different dart version, you can use following command.

To switch to different dart version, you must first disconnect with your current dart version. Type:

brew unlink dart @<current-dart-version>

Now you can switch to version of your choice. Type following command.

brew link dart @<new-dart-version>

It is no wonder if you have to uninstall the dart from your mac. To do that just type following command in your terminal app.

brew uninstall dart

After that you can remove the dart folder by typing following command.

rm -rf ~/.dart*

Thank you for reading this tutorial. If you like the article or if it has helped you to achieve what you wanted, do give a like and follow me for more such knowledgeful pieces.

courseshow tointerviewlistVocal

About the Creator

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2026 Creatd, Inc. All Rights Reserved.