KEMBAR78
Dart and Flutter Basics.pptx
Dart and Flutter Basic
Build beautiful apps for every platform
Swapnil Kumar Sahu
Technical Member
@Enigma VSSUT
What is Dart?
Dart is a programming language designed for client
development,such as for the web and mobile apps. It is developed
by Google and can also be used to build server and desktop
applications.
Dart
● Optimized for UI
○ Develop with a programming language specialized around
the needs of user interface creation
● Productive Development
○ Make changes iteratively: use hot reload to see the result
instantly in your running app
● Fast on all Platforms
○ Compile to ARM & x64 machine code for mobile, desktop,
and backend. Or compile to JavaScript for the web
Dart
● Variables
● Data Structures
● Flow Control
● Conditionals
● Functions
● Classes
var name = 'Voyager I';
var year = 1977;
var antennaDiameter = 3.7;
var flybyObjects = ['Jupiter', 'Saturn',
'Uranus', 'Neptune'];
var image = {
'tags': ['saturn'],
'url': '//path/to/saturn.jpg'
};
Variables
Control Flow statements
if (year >= 2001) {
print('21st century');
} else if (year >= 1901) {
print('20th century');
}
Conditionals
for (final object in flybyObjects) {
print(object);
}
for (int month = 1; month <= 12; month++) {
print(month);
}
while (year < 2016) {
year += 1;
}
Functions
int fibonacci(int n) {
if (n == 0 || n == 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
var result = fibonacci(20);
Lists
List desserts = ['cookies', 'cupcakes', 'donuts', 'pie'];
final numbers = [42, -1, 299792458, 100];
Maps
Map<String, int> calories = {
'cake': 500,
'donuts': 150,
'cookies': 100,
};
Classes
class Gerrit {
String id;
String userId;
String subject;
Gerrit(id, userId, subject) {
this.id = id;
this.userId = userId;
this.subject = subject;
}
}
v
“Flutter is the first UI
platform
that is designed for an
ambient computing world.”
Tim Sneath
Product Director, Flutter & Dart
@timsneath
Flutter
Flutter is an open source framework
by Google for building beautiful,
natively compiled, multi-platform
applications from a single codebase.
Flutter
● Fast
● Productive
● Beautiful
● Open
● Portable
Widgets
Create beautiful apps faster with Flutter’s collection of
visual, structural, platform, and interactive widgets.
Stateless Widgets and Stateful
Widgets
Basic Widgets
1. Text
2. Row
3. Column
4. Centre
Single-child Layout Widgets
Align AspectRatio Baseline Centre
Single-child Layout Widgets
Constrained
Box
Container Padding SizedBox
Multi-child Layout Widgets
Row
Column GridView ListView Stack
Layout Widgets
Layout Widgets
Row Widget
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.asset('images/pic1.jpg'),
Image.asset('images/pic2.jpg'),
Image.asset('images/pic3.jpg'),
],
);
Column Widget
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Image.asset('images/pic1.jpg'),
Image.asset('images/pic2.jpg'),
Image.asset('images/pic3.jpg'),
],
);
Let’s Connect! 👨👦👦
@gdscvssut
DSC VSSUT Burla
GDSC VSSUT Burla
@gdscvssut
http://bit.ly/dscvssut-youtube
https://discord.gg/tYx6ActNtc
Follow us on our social media handles
and
Stay tuned to our recent updates!
Thank you!

Dart and Flutter Basics.pptx