Dart Programming Part #1
Nitin Reddy
Posted on July 19, 2020
This is an intro to the Dart programming language.
What is Dart?
Dart is created by Google mainly to allow developers to build web interfaces and mobile apps with Flutter.
You can say that Google is trying to challenge JavaScript with Dart as its primary web programming language.
Dart is one of the easiest programming languages to start with. Let's dig in and find out how the dart program works.
Installing Dart
Dart can be installed on Windows, Linux, and Mac by following the instructions.
You can use the VS Code, IntelliJ Idea, or any other latest IDEs to work with dart files. Dart extensions/plugins are available for the above-mentioned IDEs.
Programming with Dart
Let’s take a simple hello world program
Here on the line #1 main() is an entry point of any dart program. Void implies that the function block will not return any value. More importantly, the main() executes automatically.
On line #2 is a print() which is a built-in function of dart which prints any line of text to the console. The semicolon is the most important part of any code instruction inside a code block with opening and closing braces. If you do not give semicolon you will encounter errors.
This little program does not do much but it can be a good starting point if you are learning new programming as I am learning right now.
Motivation
One of my main motivations to learn dart is to build my first Flutter app which can be mobile, web, or desktop.
Hope you like this article and got some learning with the dart.
Happy learning, stay healthy, and stay safe !!
Posted on July 19, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.