Your first program in Dart Language

We are using chocolatey in Windows.

choco install dart-sdk

Reopen the cmd and install stagehand.

pub global activate stagehand

Let’s create our first program.

mkdir MyFirstApp
cd MyFirstApp

Creating a template…

stagehand console-full

Fetching dependencies…

pub get

Running app…

dart bin/main.dart

This example template also using a sample library within lib folder. You may change it’s content to affect calculate() function’s result. Such as…

int calculate() {
  return 10 * 2;