The Dart SDK has the libraries and command-line tools that we need to develop apps. To run dart program, we can use online DartPad and we have to install SDK on the system. So, Install it with the help of the following instruction.
1. First of all, download the Dart Installer from the official website www.gekorm.com.
2. Now, run the Dart Installer and follow the installation wizard.
3. Select the installation path and click next.
after that, you will see the final installation finish window.
4. After successfully installation dart SDK, we have to set the PATH environment variable to C:\Program Files\Dart\dart-sdk\bin in advanced system properties.
5. Now, open the terminal and run the dart command in order to verify the Dart installation working successfully.
Online DartPad compiler
-------------------------------------------------------------------
You can run dart program on online dart editor DartPad. It can execute the script and displays both HTML as well as console output. It contains some sample program to learn that you can change from the right top button. The Dartpad online editor looks like as below:-
IDE Support
You can install dart in IDE's. Examples include Eclipse, IntelliJ, Android Studio and WebStorm from Jet brains.
At the end, if you have set up your environment of dart SDK. You can run the following Hello World code snippet.
void main() { for (var i = 0; i < 4; i++) { print('Hello World $i'); } } Output: Hello World 0 Hello World 1 Hello World 2 Hello World 3