Lately, I keep hearing about the Dart language all over the Internet, so this weekend I decided to take a quick look at it.

Dart is a programming language developed by Google for building mobile, web, desktop and IoT applications, and it has even been used for Google’s advertising products. Its best-known use today is Flutter, Google’s UI framework that lets you build apps for iOS, Android and more from a single codebase.

If you come from Java, JavaScript or TypeScript, Dart’s syntax will feel familiar. It borrows many ideas from these languages (classes, generics, async/await, and Streams similar in spirit to RxJS) while adding its own improvements. In this post, I will skim through the basics, mainly by comparing Dart with Java.

Dart examples can run  in DartPad, an interactive, browser-based tool OR Visual Studio Code with the Dart Code extension. 

Dart uses the following tools:

  • stagehand - provide templates for creating Dart apps
  • pub - package manager for Dart

Install dart on Windows:

You can install the Dart SDK using Chocolatey.

To install the Dart SDK:

C:\> choco install dart-sdk

To upgrade the Dart SDK:

C:\> choco upgrade dart-sdk

Another method is that The SDK can be  installed by installing Flutter from https://flutter.dev/docs/get-started/install/windows.

Here is the log from install dart progress using Chocolatey:


Open new terminal on windows, type something like this

C:\Users\Admin>dart --version
Dart SDK version: 2.9.2 (stable) (Wed Aug 26 12:44:28 2020 +0200) on "windows_x64"

As the result, Dart language was installed on windows and fluter is also installed at C:\src\flutter folder

Angular Dart:

AngularDart is the same as standard Angular, except it uses Dart instead of TypeScript.

Where Dart may go:

Dart is still a young language, so it needs time to build the rich ecosystem that real-world production demands. Over the next five years, I think Dart may succeed in the following areas:
  • Mobile: Flutter will take market share from React Native.
  • Web front-end: Flutter for Web and AngularDart will be adopted more and more.
  • IoT: Dart could be used to build high-performance IoT servers, though this is still an open question.
  • Advertising and marketing: Dart will find more use in advertising and marketing tools.
Where Dart will not beat Java:
  • Back-end development: Dart is unlikely to overtake Java here. Java has a huge range of mature open-source projects (such as Spring) that cover almost every business need. Dart is mainly used for front-end frameworks like AngularDart and Flutter, and I don’t know yet whether it will grow into a back-end role like Java Spring.

Good news for Java developers

Dart’s syntax is very close to Java’s, so a Java developer can start building Flutter apps right away.

Reference: