0% found this document useful (0 votes)
6 views8 pages

Week-6-2

Dart is an open-source, object-oriented programming language developed by Google in 2011, primarily used for creating frontend user interfaces in web and mobile applications. It supports both just-in-time and ahead-of-time compiling, making it efficient for modern UI development, particularly with the Flutter framework. The document also covers Dart's main function, syntax, data types, and basic printing techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

Week-6-2

Dart is an open-source, object-oriented programming language developed by Google in 2011, primarily used for creating frontend user interfaces in web and mobile applications. It supports both just-in-time and ahead-of-time compiling, making it efficient for modern UI development, particularly with the Flutter framework. The document also covers Dart's main function, syntax, data types, and basic printing techniques.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

CONTENTS

*For the development of an application in Flutter, you need


knowledge about the programming language called DART.*

What is Dart?
Dart Main Function
Dart Syntax
Dart Data Types
WHAT IS DART?
A few definitions of DART:
 Dart is an open-source, general-purpose, object-oriented
programming language with C-style syntax developed by Google
in 2011. The purpose of Dart programming is to create frontend
user interfaces for the web and mobile apps. Inspired by other
programming languages such as Java, JavaScript, C# etc.
 Dart is an object-oriented programming language developed by
Google in 2011, similar to JavaScript. Dart has the optional ability
to convert Dart code into JavaScript for a web application.
 The fundamentals of Dart (a programming language) are similar
to all higher-level languages. You'll find familiarity in Dart syntax
if you're coming from JavaScript, Java, or any other C-like
language.
FLUTTER USES DART, WHY?
 In the last few years, Dart has made great strides to be a nice
language specifically for writing modern UIs.

 The Dart team and Flutter team get to work closely together on
feature development. This relationship allows Dart to support
Flutter, rather than Flutter rely on outside forces.

 Dart supports both just in time (JIT) compiling and ahead of time
(AOT ) compiling: -- The AOT compiler changes Dart into efficient
native code. (In development mode, Flutter is compiled just-in-
time. That is why we can do hot-reload/restart so fast. In release
mode (when you go to publish your app), your code is compiled
ahead-of-time, to native code. )

 Dart is object-oriented. This makes it easy to write visual user


experiences with Dart.
Dart Main Function
The main() function is the top-level function of the Dart. It is the
most important and vital function. The execution of the
programming starts with the main() function. The main() function
can be used only once in a program.

void main()
{
print(“Hello World");

}
DART SYNTAX
Dart Identifiers
Identifiers are the name which is used to define variables, methods, class,
and function, etc. An Identifier is a sequence of the letters([A to Z],[a to
z]), digits([0-9]) and underscore(_), but remember that the first character
should not be a numeric.
DART PRINTING AND STRING
INTERPOLATION
The print() function is used to print output on the console,
and $expression is used for the string interpolation. Below is an
example.

void main()
{
var name = "Peter";
var roll_no = 24;
print("My name is ${name} My roll number is ${roll_no}");
}
DART DATA TYPES
The data types are the most important fundamental features of programing
language. In Dart, the data type of the variable is defined by its value. Each
variable has its data-type. The Dart is a static type of language, which
means that the variables cannot modify.
Dart supports the following built-in Data types.
 Number (Integer, double)
 Strings (String, var)
 Boolean (bool)
 Lists (var list=[1,2,3])
 Maps (var person = {'name': 'Joseph', 'age':25} key-value pairing)
 Runes (Unicodes -Unicode is a technique which is used to describe a unique numeric
value for each digit, letter, and symbol i.e. var smilesymbol = '\
u{1f600}'; print(laughsymbol);) //\u{1f60e}

You might also like