DEV Community

Cover image for Dart Programming Part #1
Nitin Reddy
Nitin Reddy

Posted on

2 1

Dart Programming Part #1

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

Alt Text

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.

Alt Text

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.

Alt Text

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 !!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️