Getting Started with Dart……
Dart is a Client-Optimized programming language for writing apps on multiple Platforms. It is developed by Google Inc., and used to build Mobile, Desktop, Embedded and Web apps
Dart is an Object-Oriented, Class based, Garbage Collected Language, and it is musch same as C-Style Syntax language.
The language supports mixins, type interference, and interfaces etc…
It is designed by Lars Bak and Kasper Land in 2011, its very first beta version came into market in 2013 v1.0.1.
In 2018, dart is stabilty released with version v2.0
Compilation of Dart code is done with these types:
- Compiled as javaScript
- StandAlone
- Native using dart2native
- Ahead Of Time
Several plugins available for featuring dart programming but the most recommended is vsCode, intellijIDEA plugin ‘Dart’.
Lets Move to the very First Code of Dart
As we discussed earlier it is a C-Style syntax language so, since mostly programming languages starts with a driver program i.e main() so here we go…
C language code
Dart Code is here(Check the similarity)…
Data Types
Dart supports the following data types:
NUMBERS (int and double)
STRINGS (UTF-16 CODE & UTF-32 CODES RUNES)
BOOLEANS
LISTS
Lists are container that contain objects…There are two types of Lists in dart i.e. Fixed Lenght lists and Growable lenght Lists.
Maps
Maps used in dart to storing key-value pairs in same object like.
Operators
Like many other programming languages dart also support operators the valid operators used in dart are:
- Arithmetic
- Assignment
- Relational
- Bitwise
- Logical
- Casecad operators
Control Flow Statements
The control statements are used to control the flow of Dart program. These statements are very important in any programming languages to decide whether other statement will be executed or not. The code statement generally runs in the sequential manner.
IF-ELSE :
FOR LOOP:
WHILE LOOP:
DO-WHILE LOOP:
A Developers preview of programming languages for the year 2019–2020 are:
Although dart is an open-source programming language which is widely used to develop the mobile application, modern web-applications, desktop application, and the Internt of Things(IoT) using by Flutter framework.
“FLUTTER IS THE FUTURE……………..”
Since Google unveiled the UI Toolkit named as Flutter in early 2017, the framework uses the dart programming language and its popularity gained day by day since its stable release, when comes to cross platform app development.
For source code of the above mentioned examples
Click Here :