Introduction to Dart Programming & its installation (Class 7)

Introduction to Dart Programming

Dart is a programming language that is used in Mobile App Development. It is similar to C++ & Java Script languages. It is essential to understand that 80 to 90 % of concepts of programming languages are the same whereas 60-70 % of syntax is also similar. So after learning one, it is easier to learn the other languages.

 

Dart Community

You can also join the following dart community in order to resolve any issue/ query related to this program:

dart.dev/community

 

Built-in Classes/ packages

There are built-in classes/ packages in Dart that can be checked from the following link:

Dart.dev/guides/libraries/library-tour

 

How to install dart on pc/ laptop

It is very easy to install Dart on your personal computer or laptop with Windows 7/8/10/11 versions. You just need to follow the requisite steps which are as under:-

 

Step 1

First download and then install Android Studio from the following link:

Click here to download Android Studio

 

Step 2

After installing Android Studio, you will offer further installation but it is required at this stage. So skip and run the program. Then go to plugins. Search and install Dart & flutter from the plugin tab one by one from the search bars.

 

Step 3

Then download Dart SDK Archive from the following link:

https://dart.dev/get-dart/archive

 

Step 4

Then on the download folder, right-click and extract it preferably to C drive. Mostly we mistake in this step so do it properly.

 

Step 5

On Android Studio, click on New Flutter Project. Then go to Dart Tab and select the dart-sdk folder in the path that we extracted earlier in C Drive.

 

Step 6

Give the project name in lowercase and save it in a suitable place. Then Android Studio interface will appear. Right-click on the project file top folder, select new, and then Dart file. Give a name to it like main.

 

Step 7

On the right top of the screen, click on add configuration and with + select dart command line app. Give the Dart path of the recent main file you created and then OK.

That’s it you have done it.

 

Any other option than Android Studio?

In case of the non-availability of Android Studio we can use Dartpad from the following link:

Dartpad.dev

 

Main structure of the dart

It is important to learn dart in order to work on flutter. If we are blank even then we can learn it but we need to give time. The basic structure of a dart is:

void main (){
 
}

 

Understanding of the main structure

Means void, main, parenthesis & curly brackets. We need to remember or cram basic structure as it is. We will understand it in functions. Did you note all alphabets in the basic structure are in small case? It shows that Dart is case-sensitive. If we type Main then it is wrong. In case of any mistake, we will get an error. We can’t do it easily on mobile so complete all Dart-related tasks on PC/ laptop for smooth functioning.

 

Brackets:

There are different types of brackets. Every bracket has a specific name so do not call only bracket or opening closing brackets. Let’s see which are the types of brackets we gonna use in Dart:-

() = parenthesis

<> = Angle bracket

{} =Curly Braces/ Body/ Block of Code. As we write code in this bracket it is also called a block of code. It is the most used bracket in Dart. We need to write it in dart as:

{

}

[] = Square brackets

 

ROBINA KOUSAR
Content Writer
**************************
You can get all Mobile App Development Classes link from here:-

Related Posts

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.