Dart Lesson 2 – Installing Dart SDK| Dataplexa

Installing Dart SDK

In this lesson, you will learn how to install the Dart SDK on your system. The Dart SDK is required to write, run, and manage Dart programs.

Dart is a cross-platform language, so the installation process is available for Windows, macOS, and Linux.


What Is Dart SDK?

The Dart SDK is a collection of tools that allow you to:

  • Compile and run Dart programs
  • Use the dart command-line tool
  • Create and manage Dart projects

Without installing the SDK, you cannot execute Dart code on your system.


System Requirements

Before installing Dart, ensure your system meets these basic requirements:

  • Windows 10 or later
  • macOS 10.15 or later
  • Linux (64-bit)
  • Internet connection

Download Dart SDK

The official Dart SDK is provided by Google and should always be downloaded from the official website.

This page automatically detects your operating system and provides installation instructions accordingly.


Installing Dart on Windows

On Windows, Dart can be installed using the official installer or through package managers.

Method 1: Using Installer

  1. Download the Windows installer from the Dart website
  2. Run the installer
  3. Follow the setup wizard

The installer automatically adds Dart to your system PATH.


Installing Dart on macOS

On macOS, Dart is commonly installed using Homebrew.

brew install dart

If Homebrew is not installed, you can install it from:


Installing Dart on Linux

On Linux, Dart can be installed using APT or Snap depending on your distribution.

Using APT (Ubuntu/Debian)

sudo apt update
sudo apt install dart

Verify Dart Installation

After installation, verify that Dart is installed correctly by checking the version.

dart --version

If Dart is installed correctly, you will see the installed version number.


Your First Dart Command

Let’s test Dart by running a simple command.

dart create hello_dart
cd hello_dart
dart run

This command creates a basic Dart project and runs it successfully.


Common Installation Issues

  • dart command not found – Restart terminal or check PATH
  • Permission denied – Run terminal as administrator or use sudo
  • Old version installed – Update Dart using your package manager

📝 Practice Exercises

Exercise 1

Install Dart SDK on your system.

Exercise 2

Run dart --version and note the output.

Exercise 3

Create a new Dart project using dart create.


What’s Next?

Now that Dart is installed and working, you are ready to learn the basic syntax of the Dart language.

In the next lesson, you will explore Dart syntax, keywords, and program structure.