How to Install and Configure Dart for Cross‑Platform Development

This guide explains what Dart is, outlines its multi‑platform use cases, and provides step‑by‑step installation commands for Linux, macOS, and Windows, plus environment‑variable configuration, enabling developers to start building Dart‑based applications across devices.

Dunmao Tech Hub
Dunmao Tech Hub
Dunmao Tech Hub
How to Install and Configure Dart for Cross‑Platform Development

What is Dart?

Dart is an object‑oriented, class‑based language developed by Google. It is statically typed but also supports dynamic typing, and is optimized for building user interfaces, asynchronous streams, and widget trees across multiple platforms.

Typical Use Cases

Mobile app development with Flutter

Web development compiled to JavaScript

Server‑side applications using dart:io or frameworks such as Aqueduct

Command‑line utilities (e.g., the Flutter CLI)

Installing Dart

Linux

Run the following commands in a terminal. The first block adds Google’s APT repository; the second block installs the SDK.

sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'wget -qO- https://dl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
# For faster access in China, replace the domain as shown below:
sudo sh -c 'wget -qO- https://storage.flutter-io.cn/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get update
sudo apt-get install dart

macOS

If Homebrew is installed, add the Dart tap and install:

brew tap dart-lang/dart
brew install dart

Windows

Using Chocolatey, install the SDK from an elevated command prompt: choco install dart-sdk Run the command prompt as administrator (e.g., press Windows+R, type cmd, then press Ctrl+Shift+Enter).

Verify the installation:

dart --version
Dart version output
Dart version output

Configuring Environment Variables (Linux example)

Append Dart’s bin directory to the PATH variable, for example by adding the following line to ~/.profile and reloading the shell:

echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.profile
DARTFluttermobile developmentCross-PlatformInstallationenvironment variables
Dunmao Tech Hub
Written by

Dunmao Tech Hub

Sharing selected technical articles synced from CSDN. Follow us on CSDN: Dunmao.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.