To learn the Dart, we need to set up the Dart programming environment to our local machine. We are describing the following instructions to install the Dart SDK (Software Development Kit) in various operating systems. If you have already installed it, then you can skip this part.
Install the Dart SDK on Windows
Follow the below instructions to install Dark SDK in Windows.
Step -1: Go to the browser and type the following link to download the SDK.
It will open the given page. Click on the following link.
Step - 2: Run the Dart installer(It is the .exe file that we downloaded in the previous step) and click on the Next button.
Step - 3: It provides the option to select the Dart installation path. After the path is selected, click on the Next button.
Step - 4: After the download is completed, set the PATH environment variable to "C:\Program Files\Dart\dart-sdk\bin" in advance system properties.
Step - 5: Now open the terminal and verify the Dart installation by typing dart.
If it is successfully installed then it looks like the above image.
Install the Dart SDK on Linux
The steps of Dart installation on Linux is given below.
Before installing the Dart, if you are Debian/Ubuntu on AMD64(64-bit Intel) in your local machine, you can install the Dart through one of the following options.
Installation using apt-get
Step -1: Type the following commands for a one-time setup.
Step - 2: Type the following command in terminal to install the Dart SDK using apt-get option.
It will successfully download the Dart SDK.
Installation a Debian Package
We can download Dart SDK as a Debian package in the .deb package format. To make all Dart binaries accessible, we have to change the PATH by typing the following command.
To change the PATH for upcoming terminal sessions, use a below command:
Install the Dark SDK on Mac
Step -1: We should have Homebrew package manager, but if we don't have it then install the Homebrew and run the following command. It will successfully download the Dart on the Mac.
Step -2: To verify which version we have installed, use the following command.
Online Dart Editor
We have discussed Dark installation on the various operating systems so far, but if we do not want to install Dart then there is an online Dark editor (Known as DartPad) is available to run the Dark programs. The online DartPad is provided at https://dartpad.dev/. The DartPad offers to execute the dart scripts and display HTML and also console output. The online DartPad looks like the below image.
Dart IED Support
The Eclipse, IntelliJ, and WebStorm are the IDEs from the Jet brains that support the Dart Programming, but WebStorm is more popular than others. We can download it from https://www.jetbrains.com/webstorm/download/#section=windows-version.
The dart2js Tool