Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
278 commits
Select commit Hold shift + click to select a range
36bb839
third commit
PranavMasekar Sep 18, 2021
a1f58a3
editing
PranavMasekar Sep 18, 2021
4f68ee3
commit
PranavMasekar Sep 18, 2021
4997490
commit 2
PranavMasekar Sep 18, 2021
c8552b7
Dart conditionals added
adityaraj079 Sep 18, 2021
a1c9138
Dart.md modified
adityaraj079 Sep 18, 2021
8a7f971
Dart conditionals added
adityaraj079 Sep 18, 2021
8ed242e
Dart conditionals added
adityaraj079 Sep 18, 2021
90c8b60
Dart conditionals added
adityaraj079 Sep 18, 2021
156371e
dart.md modified
adityaraj079 Sep 18, 2021
c20984d
dart,md finalized
adityaraj079 Sep 18, 2021
93ef42e
Merge branch 'Android_Development_With_Flutter' into Android_Developm…
ViAsmit Sep 18, 2021
102e399
Merge pull request #603 from PranavMasekar/Android_Development_With_F…
ViAsmit Sep 18, 2021
28dd0e6
Update exercises.md
ViAsmit Sep 18, 2021
22bc03b
Update exercises.md
ViAsmit Sep 18, 2021
159d1d4
Install flutter and android studio
Janak2401 Sep 18, 2021
2a6bdd0
Inheritance problem added
Simran1604 Sep 19, 2021
e7dd355
How to install and setup Flutter
aaryan078 Sep 19, 2021
a7fa333
Update How to install and setup Flutter.md
aaryan078 Sep 19, 2021
473fc63
Merge pull request #747 from Janak2401/flutter-install
ViAsmit Sep 19, 2021
d25326d
Merge pull request #710 from adityaraj079/Android_Development_With_Fl…
ViAsmit Sep 19, 2021
1000baa
Merge pull request #825 from Simran1604/Android_Development_With_Flutter
ViAsmit Sep 19, 2021
998a0c7
resolved #152
jaissumi1402 Sep 19, 2021
e3673c1
Excercise - Functions
naveeramesh Sep 19, 2021
c28cb5d
Merge pull request #969 from naveeramesh/Android_Development_With_Flu…
ViAsmit Sep 19, 2021
565765a
Merge branch 'Android_Development_With_Flutter' into Android_Developm…
ViAsmit Sep 19, 2021
86d549e
Merge pull request #174 from jaissumi1402/Android_Development_With_Fl…
ViAsmit Sep 19, 2021
311157c
Update exercises.md
ViAsmit Sep 19, 2021
130e1d7
Merge branch 'Android_Development_With_Flutter' into Android_Developm…
ViAsmit Sep 19, 2021
1a907df
[Refactored]
Niranjan5601 Sep 19, 2021
0b26234
edited 2
Niranjan5601 Sep 19, 2021
761d9e2
Refactored and merged a file
Niranjan5601 Sep 20, 2021
f99e80c
Added Flutter logo
iamayushkr Sep 20, 2021
1202ebe
Update readme.md
iamayushkr Sep 20, 2021
a59cbbe
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
iamayushkr Sep 20, 2021
e5dd60f
Merge pull request #1435 from iamayushkr/Android_Development_With_Flu…
ViAsmit Sep 21, 2021
0702445
Merge pull request #1485 from Niranjan5601/Android_Development_With_F…
ViAsmit Sep 21, 2021
511f7b8
Delete functions.md
ViAsmit Sep 21, 2021
86feedf
Merge pull request #535 from msbuddhu/Android_Development_With_Flutter
ViAsmit Sep 21, 2021
64e92fd
Update exercises.md
ViAsmit Sep 21, 2021
c000961
Stateless Widget
msramesh2k1 Sep 21, 2021
d8279cc
Stateful Widget
naveeramesh Sep 21, 2021
e7a4949
Flutter : Widget documentation
supriya-045 Sep 21, 2021
9403d6d
Added Flutter Widgets documentation
supriya-045 Sep 21, 2021
b746432
Update flutter_Widgets.md
supriya-045 Sep 22, 2021
df43624
Delete Flutter_Widgets.ipynb
supriya-045 Sep 22, 2021
62fdeda
Merge pull request #1725 from supriya-045/Android_Development_With_Fl…
ViAsmit Sep 22, 2021
7c4294a
Added a document about Shared Preferences
Safwan310 Sep 22, 2021
c209b56
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
aaryan078 Sep 22, 2021
64720af
Merge pull request #839 from aaryan078/Android_Development_With_Flutter
ViAsmit Sep 23, 2021
b5f92cd
added list and grid view
Niranjan5601 Sep 24, 2021
9485d8b
Merge branch 'Android_Development_With_Flutter' of https://github.com…
Niranjan5601 Sep 24, 2021
c597b16
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Niranjan5601 Sep 24, 2021
5cce526
folder structure 25 Sep
ViAsmit Sep 25, 2021
13d1e6b
Merge pull request #1500 from naveeramesh/Android_Development_With_Fl…
ViAsmit Sep 25, 2021
88ac120
Merge pull request #1961 from Safwan310/Android_Development_With_Flutter
ViAsmit Sep 25, 2021
53a6962
added comments
Niranjan5601 Sep 25, 2021
cb90f6b
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Niranjan5601 Sep 25, 2021
b4b7232
Stateless Widget
msramesh2k1 Sep 26, 2021
b84ff82
added commas
Niranjan5601 Sep 26, 2021
a8d1393
Merge branch 'Android_Development_With_Flutter' of https://github.com…
Niranjan5601 Sep 26, 2021
efee7ee
Merge pull request #2514 from Niranjan5601/Android_Development_With_F…
ViAsmit Sep 26, 2021
6d10c86
Install Flutter and VS Code
bakisama Sep 27, 2021
3e7bff6
Install Flutter and VS code
bakisama Sep 27, 2021
f927950
Update Setup_Flutter_&_VS_Code.md
bakisama Sep 27, 2021
909f1b2
Update Setup_Flutter_&_VS_Code.md
bakisama Sep 27, 2021
c0a49d3
Merge pull request #1493 from msramesh2k1/Android_Development_With_Fl…
ViAsmit Sep 27, 2021
9d56a79
Create CONTRIBUTORS.md
ViAsmit Sep 27, 2021
4ece67f
Update CONTRIBUTORS.md
ViAsmit Sep 27, 2021
1799a3b
Create Widgets
jaissumi1402 Sep 28, 2021
c784b5f
Added a documentation about Basic Widgets used in flutter
Safwan310 Sep 28, 2021
8054b7c
Merge branch 'Android_Development_With_Flutter' of https://github.com…
Safwan310 Sep 28, 2021
f1101e8
Resized the images
Safwan310 Sep 28, 2021
c7ede7f
Update and rename Widgets to Appbar_widget.md
jaissumi1402 Sep 28, 2021
a0e5af2
Merge pull request #3164 from bakisama/Android_Development_With_Flutter
ViAsmit Sep 29, 2021
4bc5c4b
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Safwan310 Sep 30, 2021
09f78c0
Made the necessary changes
Safwan310 Sep 30, 2021
370c08a
Create Appbar_widget.md
jaissumi1402 Sep 30, 2021
c9660ae
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
jaissumi1402 Sep 30, 2021
2ed4657
Delete Appbar_widget.md
jaissumi1402 Sep 30, 2021
59e677d
Create first.png
jaissumi1402 Sep 30, 2021
1b68acb
Update first.png
jaissumi1402 Sep 30, 2021
c1eb605
Delete first.png
jaissumi1402 Sep 30, 2021
690422c
images for reference
jaissumi1402 Sep 30, 2021
ac18fc5
Made changes to the examples
Safwan310 Sep 30, 2021
a2b5b74
Made changes to the examples
Safwan310 Sep 30, 2021
3180fa5
documentation on appbar
jaissumi1402 Sep 30, 2021
377bcfd
appbar documentation
jaissumi1402 Sep 30, 2021
0a638f7
Flutter: Animations #1691
RK1905101 Sep 30, 2021
5e8da6a
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
RK1905101 Sep 30, 2021
14009ca
updated
jaissumi1402 Sep 30, 2021
2985abf
updated Appbar documentation
jaissumi1402 Sep 30, 2021
1f18450
Added Animation in Flutter
eshan1925 Sep 30, 2021
a30468d
Update Appbar_widget.md
jaissumi1402 Sep 30, 2021
f1062f3
Added hyperlink
jaissumi1402 Sep 30, 2021
0853b04
Update Appbar_widget.md
ViAsmit Sep 30, 2021
0e65914
Merge pull request #3654 from jaissumi1402/Android_Development_With_F…
ViAsmit Sep 30, 2021
f1630da
Added Animations Documentation
eshan1925 Sep 30, 2021
83bd374
Update Animation-Documentation.md
eshan1925 Sep 30, 2021
d963e85
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
eshan1925 Sep 30, 2021
e7f54c1
Update Animation-Documentation.md
eshan1925 Sep 30, 2021
0b27321
Create readme.md
PranavMasekar Oct 1, 2021
6a89690
Merge pull request #3817 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 1, 2021
a845635
Update list_and_grid_view.md
ViAsmit Oct 1, 2021
4b578d1
Create list_and_grid_view.md
ViAsmit Oct 1, 2021
6da1129
Merge pull request #3729 from eshan1925/Android_Development_With_Flutter
ViAsmit Oct 1, 2021
458a454
Merge pull request #3361 from Safwan310/Android_Development_With_Flutter
ViAsmit Oct 1, 2021
ead43db
Added Readme.md and Assets Folder
iamayushkr Oct 3, 2021
eefbe54
Renamed Folders
iamayushkr Oct 3, 2021
dfff557
Modified Readme.md
iamayushkr Oct 4, 2021
acb622b
Merge pull request #3661 from RK1905101/Android_Development_With_Flutter
ViAsmit Oct 4, 2021
d6b5ba6
Updated readme.md
iamayushkr Oct 5, 2021
6808480
Updated readme.md
iamayushkr Oct 5, 2021
163af05
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
iamayushkr Oct 5, 2021
af539f8
Create first.png.png
jaissumi1402 Oct 6, 2021
442206d
Create text_widget.md
jaissumi1402 Oct 6, 2021
4c7ca89
image name changed
jaissumi1402 Oct 6, 2021
4f511a3
Merge branch 'Android_Development_With_Flutter' of https://github.com…
jaissumi1402 Oct 6, 2021
4e7418c
new images added
jaissumi1402 Oct 6, 2021
c2b5021
Update third.png
jaissumi1402 Oct 6, 2021
b356a2b
new image
jaissumi1402 Oct 6, 2021
6b20ca0
Update text_widget.md
jaissumi1402 Oct 6, 2021
1a09606
Added asset.md
Janhvi-s Oct 6, 2021
6dcdb4f
Update text_widget.md
jaissumi1402 Oct 7, 2021
2d57a96
Merge pull request #4761 from jaissumi1402/Android_Development_With_F…
ViAsmit Oct 7, 2021
911ded2
Merge pull request #4396 from iamayushkr/Android_Development_With_Flu…
ViAsmit Oct 7, 2021
4eb3949
Create Animation-Video.md
Rosy-Chadha Oct 7, 2021
e7c9bb8
material components
Niranjan5601 Oct 7, 2021
d90b217
Edited
Niranjan5601 Oct 7, 2021
b27cafc
added link
Niranjan5601 Oct 7, 2021
171f6b5
Merge pull request #4985 from Niranjan5601/Android_Development_With_F…
ViAsmit Oct 8, 2021
3e238a8
folder structure
ViAsmit Oct 8, 2021
4f60bff
Update CONTRIBUTORS.md
ViAsmit Oct 8, 2021
e553e2a
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Janhvi-s Oct 8, 2021
cb8abd9
fixed asset.md
Janhvi-s Oct 8, 2021
c3b602f
Merge pull request #4823 from Janhvi-s/Android_Development_With_Flutter
ViAsmit Oct 8, 2021
0a59eac
added assets for dice project
Niranjan5601 Oct 10, 2021
a224d60
added asset to pubspec
Niranjan5601 Oct 10, 2021
871d787
Merge pull request #5452 from Niranjan5601/Android_Development_With_F…
ViAsmit Oct 10, 2021
cefd5d1
Added a static home page
Safwan310 Oct 10, 2021
58632d5
Added image widget
Niranjan5601 Oct 11, 2021
313dee2
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Niranjan5601 Oct 11, 2021
ef088b8
flutter dealing with assets video
akshat-crypto Oct 11, 2021
4f0e1d4
update_1
akshat-crypto Oct 11, 2021
fbf64f1
Merge pull request #5463 from Safwan310/Android_Development_With_Flutter
ViAsmit Oct 11, 2021
c90ac3e
Merge pull request #4963 from Rosy-Chadha/Android_Development_With_Fl…
ViAsmit Oct 11, 2021
3068e55
images added in assets folder
jaissumi1402 Oct 11, 2021
7a68369
flutter dealing with assets links
akshat-crypto Oct 11, 2021
34a5b1e
flutter_dealing_with_assets_minor_change
akshat-crypto Oct 11, 2021
571cb5c
flutter_dealing_with_assets_minor_change2
akshat-crypto Oct 11, 2021
707d48f
flutter_dealing_with_assets_minor_change3
akshat-crypto Oct 11, 2021
2bd2916
Merge pull request #5503 from akshat-crypto/Android_Development_With_…
ViAsmit Oct 11, 2021
31f2118
Create Navigation_in_Flutter.md
SurabhiMishra Oct 11, 2021
1023609
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
SurabhiMishra Oct 11, 2021
4492c28
Merge pull request #5500 from jaissumi1402/Android_Development_With_F…
ViAsmit Oct 11, 2021
bd6550a
Bulb App Ui
naveeramesh Oct 11, 2021
b438120
Merge pull request #5598 from naveeramesh/Android_Development_With_Fl…
ViAsmit Oct 11, 2021
7ba48b8
Update Navigation_in_Flutter.md
ViAsmit Oct 11, 2021
f4ee9d5
Merge pull request #5538 from SurabhiMishra/Android_Development_With_…
ViAsmit Oct 11, 2021
67d5756
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Niranjan5601 Oct 11, 2021
7139e2a
logic added
PranavMasekar Oct 12, 2021
955402b
Merge pull request #5645 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 12, 2021
a5d0872
Added logic for bulb app
Niranjan5601 Oct 12, 2021
6b27cf3
Merge branch 'girlscript:Android_Development_With_Flutter' into Andro…
Niranjan5601 Oct 12, 2021
d53ec4d
Merge pull request #5477 from Niranjan5601/Android_Development_With_F…
ViAsmit Oct 12, 2021
894399b
folder structure + whatsapp
ViAsmit Oct 14, 2021
d2a4600
Update README.md
PranavMasekar Oct 17, 2021
7b6b5a3
Merge pull request #6212 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 17, 2021
ce5d9a7
Create dice_app_video.md
Rosy-Chadha Oct 18, 2021
b76fd20
Merge pull request #6289 from Rosy-Chadha/Android_Development_With_Fl…
ViAsmit Oct 18, 2021
8417e12
Update dice_app_video.md
Rosy-Chadha Oct 19, 2021
82c19c1
Update README.md
RK1905101 Oct 20, 2021
510605a
updated readme file of bulb app
RK1905101 Oct 22, 2021
87df37a
Updated the changes
RK1905101 Oct 23, 2021
c0514cf
Update README.md
RK1905101 Oct 23, 2021
73a76ca
Merge pull request #6540 from RK1905101/Android_Development_With_Flutter
ViAsmit Oct 23, 2021
d71d1f0
Added App bar and TabBar
Safwan310 Oct 24, 2021
bf41697
Fixed Typos
Safwan310 Oct 24, 2021
7ed6d6e
Merge pull request #6394 from Rosy-Chadha/Android_Development_With_Fl…
ViAsmit Oct 24, 2021
3965856
Merge pull request #6649 from Safwan310/Android_Development_With_Flutter
ViAsmit Oct 26, 2021
afcfe2c
models added
PranavMasekar Oct 27, 2021
3308b1d
Merge pull request #6738 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 27, 2021
58e2bba
Chat Screen added
PranavMasekar Oct 30, 2021
2c9e09e
Merge branch 'Android_Development_With_Flutter' of https://github.com…
PranavMasekar Oct 30, 2021
b25914b
Merge pull request #6935 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 30, 2021
c837b8f
.md file added
PranavMasekar Oct 30, 2021
6188121
Documentation on deep link for android
Niranjan5601 Oct 30, 2021
0c4f00d
Merge branch 'Android_Development_With_Flutter' of https://github.com…
Niranjan5601 Oct 30, 2021
b1a8390
Merge pull request #6961 from Niranjan5601/Android_Development_With_F…
ViAsmit Oct 30, 2021
dc777f9
Merge pull request #6955 from PranavMasekar/Android_Development_With_…
ViAsmit Oct 30, 2021
9b85bb4
Firebase authentication
naveeramesh Nov 1, 2021
ed54018
Modified Call Screen and Call Model
Gagarod Nov 1, 2021
48e4f26
Merge pull request #7084 from naveeramesh/Android_Development_With_Fl…
ViAsmit Nov 1, 2021
9cfb637
added message screen
Niranjan5601 Nov 1, 2021
743b410
Added message screen
Niranjan5601 Nov 2, 2021
8ad3318
Merge pull request #7102 from Gagarod/callScreen
ViAsmit Nov 2, 2021
9bb8f93
added reply message
Niranjan5601 Nov 5, 2021
9a80360
modified
Niranjan5601 Nov 5, 2021
2da76ca
Merge pull request #7172 from Niranjan5601/Android_Development_With_F…
ViAsmit Nov 6, 2021
fb06adc
Added MultiScreen Navigation in flutter
CharanBH24 Nov 10, 2021
552b6c2
Updated Multiscreen Navigation in Flutter
CharanBH24 Nov 11, 2021
015de63
Modified the Indentation in Screen_0.dart Screen_1.dart Screen_2.dart…
CharanBH24 Nov 11, 2021
a076751
Merge pull request #7713 from CharanBH24/Android_Development_With_Flu…
ViAsmit Nov 11, 2021
eb1dfd6
done
PranavMasekar Nov 11, 2021
07da0ee
Merge branch 'Android_Development_With_Flutter' of https://github.com…
PranavMasekar Nov 11, 2021
2d003b8
Add files via upload
PranavMasekar Nov 11, 2021
0efeec8
auth code added
PranavMasekar Nov 11, 2021
29c033d
Merge pull request #7746 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 11, 2021
1d5898f
Merge branch 'Android_Development_With_Flutter' of https://github.com…
ViAsmit Nov 13, 2021
2670d8d
Folder structure
ViAsmit Nov 13, 2021
de3df9c
cloud_photos init
ViAsmit Nov 13, 2021
d39672d
added readme
PranavMasekar Nov 14, 2021
1a7d428
Merge pull request #7852 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 14, 2021
5b39b2e
UI cloud_photos
naveeramesh Nov 16, 2021
db4ac01
Added Linking User Accounts.md
Gagarod Nov 16, 2021
ce1c1d6
Long press,Spacing
naveeramesh Nov 16, 2021
d7bab6a
Merge pull request #7947 from naveeramesh/Android_Development_With_Fl…
ViAsmit Nov 16, 2021
933edb0
Authentication Added
PranavMasekar Nov 17, 2021
0263f96
Merge branch 'Android_Development_With_Flutter' of https://github.com…
PranavMasekar Nov 17, 2021
1c31e01
Auth Complete
PranavMasekar Nov 17, 2021
5ab505a
Merge pull request #7978 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 17, 2021
8de8956
Updated LinkingUserAccounts.md
Gagarod Nov 18, 2021
b257d48
Modified LinkedUserAccounts.md
Gagarod Nov 18, 2021
81374f2
Update LinkedUserAccounts.md
Gagarod Nov 19, 2021
f163c0e
Merge pull request #7948 from Gagarod/Link_Providers
ViAsmit Nov 19, 2021
b0ad8c0
uploading complete
PranavMasekar Nov 19, 2021
5e2e288
Merge branch 'Android_Development_With_Flutter' of https://github.com…
PranavMasekar Nov 19, 2021
584783d
added
PranavMasekar Nov 20, 2021
7778fad
Merge pull request #8081 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 20, 2021
efca34f
Loader added
PranavMasekar Nov 20, 2021
40f7ae2
Merge branch 'Android_Development_With_Flutter' of https://github.com…
PranavMasekar Nov 20, 2021
10e0762
Merge pull request #8129 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 21, 2021
90f7b29
Fetching data
naveeramesh Nov 21, 2021
efb0571
Fetching data
naveeramesh Nov 21, 2021
2a98e58
Merge pull request #8163 from naveeramesh/Android_Development_With_Fl…
ViAsmit Nov 21, 2021
678e7e5
code refactoring
AshAman999 Nov 22, 2021
9b96ed2
added cache network images
AshAman999 Nov 22, 2021
8cb7d5a
restore the auth functions
AshAman999 Nov 22, 2021
249c24b
Merge pull request #8243 from AshAman999/cloud_photos_improve
ViAsmit Nov 22, 2021
73e0f4a
fetch Image on uploadng also + reactoring
ViAsmit Nov 23, 2021
822587b
View Image
naveeramesh Nov 23, 2021
8297cff
View Image
naveeramesh Nov 23, 2021
169aa59
Size
naveeramesh Nov 23, 2021
d75afec
Merge pull request #8280 from naveeramesh/Android_Development_With_Fl…
ViAsmit Nov 23, 2021
ffecbf8
readme added
PranavMasekar Nov 24, 2021
c51b242
updated
PranavMasekar Nov 25, 2021
63bc774
Merge pull request #8384 from PranavMasekar/Android_Development_With_…
ViAsmit Nov 25, 2021
459e266
project 4
ViAsmit Nov 27, 2021
4c9b938
Merge branch 'main' of https://github.com/girlscript/winter-of-contri…
ViAsmit Nov 27, 2021
6054351
Delete CONTRIBUTORS.md
ViAsmit Dec 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
382 changes: 382 additions & 0 deletions Android_Development_With_Flutter/01_Introduction_To_Dart/dart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,382 @@
![Introduction to Dart](https://user-images.githubusercontent.com/71007973/133734431-8ebc98ce-a455-4279-b014-6e7f06735907.jpg)
### What is Dart?

Dart is a programming language to develop multiple platform application in Flutter.
It is a comprehensive language and offers excellent language capabilities, such as Future, Stream, Sound Null Safety.

#### Dart Libraries :

* dart:async,
* dart:convert,
* dart:html,
* dart:io,
etc., and also handle package manager pub dev

### Dart Variables

A variable acts as a container for values in a program. Variable names are also called identifiers.

### Rules :
1. Identifiers cannot be keywords.
2. Identifiers can contain alphabets and numbers.
3. Identifiers cannot contain spaces and special characters, except the underscore (_) and the dollar ($) sign.
4. Variable names cannot begin with a number.
#### Syntax :
```
var var_name = "John Doe";
int num = 96;
```
We also **Dynamic Keyword** which helps to change the **datatype** in futures .

### Data Types

The most fundamental of the programming language is **Data Type** .
- Numbers - used to represent numeric literals
- Strings - used to represent sequence of characters
- Booleans - used to represent values is True or False
- Lists - used to represent collection of Objects
- Maps - similar to list additionally key value pairs

### Dart Function

A function is a set of statements to perform a specific task and helps to reuse code in block manner. After functions are defined , call the function to access code .Moreover, functions make it easy to read and maintain the program’s code. A function declaration tells the compiler about a function's name, return type, and parameters.

```
void main() {
print(add(2,5));
}
add(num1,num2) {
return num1+ num2;
}
```
### Arrow Functions
Lambda Functions are also called as Arrow functions.
#### What is Lambda ?
Lambda is a short and concise manner to represent small functions.
It must be only one line expression. Just like normal function lambda function cannot have a block of code to execute.
**Syntax**
```
return_type function_name(arguments) => expression;
```
**Example**

```
int Sum(int num1, int num2) => num1+ num2;
```
### Dart List

Dart List is similar to an array. Dart represents arrays in the form of List objects. A List is simply an ordered group of objects. The array is the most popular and commonly used collection in any other programming language.
```
var list1 = [3,4,6,9,15,20,]
```
#### Lists can be classified as −
- Fixed Length List

```
void main() {
var lst = new List(3);
lst[0] = 12;
lst[1] = 13;
lst[2] = 11;
print(lst);
}
```
> From the above program we can conclude that **fixed length list** means the size of the list is already **defined**
- Growable List

```
void main() {
var lst = new List();
lst.add(12);
lst.add(13);
print(lst);
}
```
> From the above program we can conclude that **growable list** means the size of the list grows whenever new elements is added to the list , In other words size of the list is not **predefined**

### Dart conditonals
The conditionals (ternary) operator is the only Dart Operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is **truthy** followed by a colon (:), and finally the expression to execute if the condition is **falsy**.

**Syntax**
```
condition ? exprIfTrue : exprIfFalse
```
> Where:
> * condition: An expression whose value is used as a condition.
> * exprIfTrue: An expression which is evaluated if the condition evaluates to a **truthy** value (one which equals or can be converted to true).
> * exprIfFalse: An expression which is executed if the condition is **falsy** (that is, has a value which can be converted to false).

**Example**

```
String message(bool isValid) {
return isValid ? 'This is valid' : 'This is not valid';
}

void main() {
print(message(true));
}
```

```
Center(
child: isLogin ? Text('You are a member') : Text('Hello Guest'),
),
```

### Dart Control Flow Statements
You can control the flow of your Dart code using any of the following:
* if and else
* for loops
* while and do-while loops
* break and continue
* switch and case

#### if and else
Dart supports if statements with optional else statements, as the next sample shows.

**Syntax**
```
if (isRaining()) {
you.bringRainCoat();
} else if (isSnowing()) {
you.wearJacket();
} else {
car.putTopDown();
}
```
#### for loops
You can iterate with the standard for loop.

**Syntax**
```
var message = StringBuffer('Dart is fun');
for (var i = 0; i < 5; i++) {
message.write('!');
}
```
#### while and do-while
A while loop evaluates the condition before the loop:

**Syntax**
```
while (!isDone()) {
doSomething();
}
```
A do-while loop evaluates the condition after the loop:

**Syntax**
```
do {
printLine();
} while (!atEndOfPage());
```
#### break and continue
Use break to stop looping:

**Syntax**
```
while (true) {
if (shutDownRequested()) break;
processIncomingRequests();
}
```
Use continue to skip to the next loop iteration:

**Syntax**
```
for (int i = 0; i < candidates.length; i++) {
var candidate = candidates[i];
if (candidate.yearsExperience < 5) {
continue;
}
candidate.interview();
}
```
#### Switch and case
Switch statements in Dart compare integer, string, or compile-time constants using ==. The compared objects must all be instances of the same class (and not of any of its subtypes), and the class must not override ==. Enumerated types work well in switch statements.

Each non-empty case clause ends with a break statement, as a rule. Other valid ways to end a non-empty case clause are a continue, throw, or return statement.

Use a default clause to execute code when no case clause matches:

**Syntax**
```
var command = 'OPEN';
switch (command) {
case 'CLOSED':
executeClosed();
break;
case 'PENDING':
executePending();
break;
case 'APPROVED':
executeApproved();
break;
case 'DENIED':
executeDenied();
break;
case 'OPEN':
executeOpen();
break;
default:
executeUnknown();
}
```

### Dart Classes
Dart is an object-oriented language. It supports object-oriented programming features like classes, interfaces, etc. A class in terms of OOP is a blueprint for creating objects. A class encapsulates data for the object. Dart gives built-in support for this concept called class.
### Declaring a Class
Use the class keyword to declare a class in Dart. A class definition starts with the keyword class followed by the class name; and the class body enclosed by a pair of curly braces.

**Syntax**
```
class class_name {
<fields>
<getters/setters>
<constructors>
<functions>
}
```
The **class** keyword is followed by the class name. The rules for identifiers must be considered while naming a class.
A class definition can include the following −
* Fields − A field is any variable declared in a class. Fields represent data pertaining to objects.
* Setters and Getters − Allows the program to initialize and retrieve the values of the fields of a class. A default getter/ setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter.
* Constructors − responsible for allocating memory for the objects of the class.
* Functions − Functions represent actions an object can take. They are also at times referred to as methods.

**Example**
```
class Car {
// field
String engine = "E1001";

// function
void disp() {
print(engine);
}
}
```
> The example declares a class Car. The class has a field named engine. The disp() is a simple function that prints the value of the field engine.

### Creating Instance of the class
To create an instance of the class, use the new keyword followed by the class name.

**Syntax**
```
var object_name = new class_name([ arguments ])
```
> * The new keyword is responsible for instantiation.
> * The right-hand side of the expression invokes the constructor. The constructor should be passed values if it is parameterized.

**Example: Instantating a Class**
```
var obj = new Car("Engine 1")
```

### Accessing Attributes and Functions
A class’s attributes and functions can be accessed through the object. Use the ‘.’ dot notation (called as the period) to access the data members of a class.
```
//accessing an attribute
obj.field_name

//accessing a function
obj.function_name()
```

**Example**
```
void main() {
Car c= new Car();
c.disp();
}
class Car {
// field
String engine = "E1001";

// function
void disp() {
print(engine);
}
}
```
The output of the above program will be **E1001**

### Dart Constructors
A constructor is a special function of the class that is responsible for initializing the variables of the class. Dart defines a constructor with the same name as that of the class. A constructor is a function and hence can be parameterized. However, unlike a function, constructors cannot have a return type. If you don’t declare a constructor, a default no-argument constructor is provided for you.

**Syntax**
```
Class_name(parameter_list) {
//constructor body
}
```
**Example**
```
void main() {
Car c = new Car('E1001');
}
class Car {
Car(String engine) {
print(engine);
}
}
```
The output of the above program will be **E1001**

### Dart Class ─ Getters and Setters
**Getters** and **Setters**, also called as **accessors** and **mutators**, allow the program to initialize and retrieve the values of class fields respectively. Getters or accessors are defined using the get keyword. Setters or mutators are defined using the **set** keyword.

A default getter/setter is associated with every class. However, the default ones can be overridden by explicitly defining a setter/ getter. A getter has no parameters and returns a value, and the setter has one parameter and does not return a value.

**Syntax: Defining a getter**
```
Return_type get identifier
{
}
```

**Syntax: Defining a setter**
```
set identifier
{
}
```

**Example**
```
class Student {
String name;
int age;

String get stud_name {
return name;
}

void set stud_name(String name) {
this.name = name;
}

void set stud_age(int age) {
if(age<= 0) {
print("Age should be greater than 5");
} else {
this.age = age;
}
}

int get stud_age {
return age;
}
}
void main() {
Student s1 = new Student();
s1.stud_name = 'MARK';
s1.stud_age = 0;
print(s1.stud_name);
print(s1.stud_age);
}
```

- - - -
Loading