To start programming we need…
- Dart SDK
- Visual Studio Code Editor
Hello Dart
scenarios
Installing Dart SDK
- Go to Dart SDK Website.
- Under
Stable channel
download the Dart SDK as zip file for your operating system. - Unzip the downloaded files to a folder like
C:\dart-sdk\
(on Windows).
Configure PATH Environment Variable
To run the Dart tools from command line we need to add two directories to the PATH environment variables.
- The
bin
subfolder where you put your Dart SDK:C:\dart-sdk\bin
(or similar) - The pub cache (Dart’s package manager):
%APPDATA%\Pub\Cache\bin
(on Windows) or$HOME/.pub-cache/bin
(on macOS)
Installing Visual Studio Code
Go to the Visual Studio Code website and install it. This will be our code editor.
Install Dart Extension
In Visual Studio Code open the extensions menu.
Then install the Dart extension. This will give us support for the Dart language in the code editor.
Install Web Server
We need a web server, called webdev, to be able to start our Dart programs.
Open the terminal in the menu with View | Terminal.
Use the command pub global activate webdev
and hit enter.
Install Web Server
We need a web server, called webdev, to be able to start our Dart programs.
Open the terminal in the menu with View | Terminal.
Use the command pub global activate webdev
and hit enter.
Install Project Generator (Stagehand)
For setting up basic web applications we will use Stagehand.
Open the terminal in the menu with View | Terminal.
Use the command pub global activate stagehand
and hit enter.
Ready
Now you are ready to start your Dart adventures, for example with Hello Dart or Dart Kanban.