Dart Class, Objects, Instance and reference Variable example. Dart Tutorial for Flutter #8.1

  Рет қаралды 90,437

Smartherd

Smartherd

Күн бұрын

Пікірлер: 49
@aviraltara9515
@aviraltara9515 9 ай бұрын
To the people, who are learning from this tutorial after 5 years , dart has changed its features now it provide null safety that means int and string does not hold null value now , non nullable datatype to make them null by type casting use - int? nullableNumber; String? nullableText; or use late keyword in front of it for example - late int x ;
@osteen4x
@osteen4x 4 жыл бұрын
You are a very good teacher. God bless you. When i become a professional full stack app developer and i start working, i promise to find you
@smartherd
@smartherd 4 жыл бұрын
Will be pleased to meet u brother
@Winner4ever
@Winner4ever 5 жыл бұрын
Best ever,I thought i knew all the basics until I watched this play list.
@muhammadsaqib1643
@muhammadsaqib1643 5 жыл бұрын
thanks for "Dart Tutorial for Beginners: Basics and Fundamentals" .
@harit4767
@harit4767 5 жыл бұрын
You have created a much helpful Dart tutorial playlist. Thank you for your efforts.
@abdulazizdeveloper7915
@abdulazizdeveloper7915 Жыл бұрын
I really don't know how to thank you for your great effort , thank you very much 👍🏻
@MassimoTodaro74
@MassimoTodaro74 5 жыл бұрын
I am very thankful for this playlist. Thank you
@karthickrajalearn
@karthickrajalearn 5 жыл бұрын
In 8m 07sec Thanks for Mentioning Default Value
@mrMayhem1337
@mrMayhem1337 3 жыл бұрын
Very well done sir. Straight to the point and clear. Thanks!
@pagal8192
@pagal8192 2 жыл бұрын
You are a very good teacher
@razasheikh4605
@razasheikh4605 4 жыл бұрын
you are my Guru Shiriank Sir :) i've learned a lot from you regarding Android Studio and now i'm learning flutter as well! i really appreciate your work! Respect and your Student from Pakistan!
@smartherd
@smartherd 4 жыл бұрын
Thank you very much
@thiruvenkatasamypranesh80
@thiruvenkatasamypranesh80 10 ай бұрын
hey noob
@kavinthapa9076
@kavinthapa9076 2 жыл бұрын
You are such a Amazing tutor Thanks a lot
@ajaykotiyal427
@ajaykotiyal427 5 жыл бұрын
Thank you so much for such tutorials.
@PrimaClicks
@PrimaClicks 4 жыл бұрын
you have an excellent job. appreciate you man. Perfect!
@kimanijesse
@kimanijesse 10 ай бұрын
perfect😂...great tutorials
@kashyapkarkar6703
@kashyapkarkar6703 5 жыл бұрын
@Smartherd thank you for this amazing course . it cleared out my basics of programming in a really smooth and understandable way.
@siva7930
@siva7930 4 жыл бұрын
best example brother
@saisasisai
@saisasisai 4 жыл бұрын
Nice 👌 Tutorial series ...!
@ricardoaraque6515
@ricardoaraque6515 3 жыл бұрын
Hi, i'd like do an ask: Why we know the values from an instance by the . instead the [], What type of var is a instance of a class?
@mrpakravian
@mrpakravian 6 жыл бұрын
Amaizing teaching
@pythonlui3922
@pythonlui3922 5 жыл бұрын
Thank you
@jafetl.ch.8961
@jafetl.ch.8961 6 жыл бұрын
thanks for the tutorial
@smartherd
@smartherd 6 жыл бұрын
U r always welcome
@SeraphimTech_io
@SeraphimTech_io 6 жыл бұрын
good job bro thx a lot every time
@fayezalle43
@fayezalle43 3 жыл бұрын
Thank you very much.
@AR-ok2qt
@AR-ok2qt 5 жыл бұрын
Hi Sir, How can you say that a variable is assigned with a class name or method name if while instantiating you are skipping the new keyword ?
@prajwaldsouza211
@prajwaldsouza211 5 жыл бұрын
The 'new' keyword is optional from Dart 2.0 onwards. He already mentioned it in the video.
@haribabumanoharan5366
@haribabumanoharan5366 2 жыл бұрын
If you give some exercise at the end of each video it will be more useful Thanks.
@pranavyogeshbaradkar1567
@pranavyogeshbaradkar1567 4 жыл бұрын
sir how can i learn advance dart tutorial. everywhere i am getting basic dart. please help. BTW great tutorial i understood many basic concept.
@rajkhanna3089
@rajkhanna3089 4 жыл бұрын
Hi brother
@andrewvillegas122
@andrewvillegas122 4 жыл бұрын
Thank you so much for this1
@krishnakumarramachandran5888
@krishnakumarramachandran5888 6 жыл бұрын
Thank you sir👍
@smartherd
@smartherd 6 жыл бұрын
Welcome. Thanks for ur comments
@zakblacki
@zakblacki 4 жыл бұрын
"this " usage is still a little confusing
@SignumCode
@SignumCode 2 жыл бұрын
hello sir your tutorial is really helping but why i got error in this code It should throw exception void main() { var s1= Student(); try{ s1.age="20"; }catch(e) { print(e); } print("${s1.name} is ${s1.age} year old"); s1.sleep(); s1.study(); } class Student { String name = "Peter"; int age = 23; void sleep() { print("${this.name} is sleeping."); } void study() { print("${this.name} is studying."); } }
@zuhaib4030
@zuhaib4030 4 жыл бұрын
your videos do really help i crush my time behind this to gain knoledge instead of wasting behind video games comment checkers subscribe to smartherd
@kennedykennedy3133
@kennedykennedy3133 5 жыл бұрын
thank
@Proviper666
@Proviper666 4 жыл бұрын
I wanted to find how to share one variable in all classes :(
@animeshbanerjee4379
@animeshbanerjee4379 5 жыл бұрын
we can write in that way without using *this keyword=> void main(){ var s1=S(); s1.id=115;s1.name='animesh'; print('${s1.id} and ${s1.name}'); s1.read(); s1.sleep(); } class S{ int id; String name; void read(){ print('$name is reading'); } void sleep(){ print('$id is sleeping'); } } The code is working so why we need *this keyword here . Please help me out ...I stuck here in oop concepts:-/
@animeshbanerjee4379
@animeshbanerjee4379 5 жыл бұрын
and one more doubt if we can initialize id and name in main function then why should we repeated the same in class ?
@kirangouds
@kirangouds 6 жыл бұрын
Why cant they just use Interface its so simple
@shivatiwari1127
@shivatiwari1127 5 жыл бұрын
👏
@rajkhanna3089
@rajkhanna3089 4 жыл бұрын
What is the use of this plz aek bar smja do hindi mai
@algeriennesaffaires7017
@algeriennesaffaires7017 2 жыл бұрын
why you say perfetc too much?
@Quvothe
@Quvothe Жыл бұрын
Updated code after null safety: void main() { var student1 = Student(); // One Object, student1 is the reference variable student1.id = 23; student1.name = "Peter"; print("${student1.id} and ${student1.name}"); student1.study(); student1.sleep(); var student2 = Student(); student2.id = 45; student2.name = "Sam"; print("${student2.id} and ${student2.name}"); student2.study(); student2.sleep(); } class Student{ int? id; String? name; void study(){ print("${this.name} is now studying."); } void sleep(){ print("${this.name} is now sleeping."); } } // After null safety you cannot introduce new variables like "String name;" without immediatly giving a value to it like String name = "Peter"; . To avoid this problem you can give a ? to the variable : String ? name; now dart knows that the value of the name variable CAN infact be null. I hope i could help!
@thiruvenkatasamypranesh80
@thiruvenkatasamypranesh80 10 ай бұрын
ns
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Introduction To Classes And Objects | C++ Tutorial
11:49
Portfolio Courses
Рет қаралды 76 М.
Java is ALWAYS Pass By Value. Here's Why
5:22
Coding with John
Рет қаралды 129 М.
Dart Data Types and Variables. Dart Tutorial for Flutter #3.1
8:00
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,3 МЛН
Inner Class Java Tutorial - Creating and Using Inner Classes
8:21
Coding with John
Рет қаралды 138 М.