Dart STATIC variables and methods. Dart Tutorial for Flutter #9.8
ฝัง
- เผยแพร่เมื่อ 20 ก.ค. 2018
- Access 7000+ courses for 15 days FREE: pluralsight.pxf.io/c/1291657/...
Dart for Beginners: Static methods and static variables are also known as Class Methods and Class Variables respectively. They can be created using 'static' keyword. Along with all these, also explore what is CONSTANT Static variables.
Next Video : • Dart Lambda Expression...
Previous Video : • Dart INTERFACE ( imple...
Code Files: bit.ly/2xHSqkQ .
.
Please donate and support my work
(If you think my free tutorials are better than paid ones :)
- Patreon: bit.ly/patreon-donate
- Paypal/Payoneer: sriyank123@gmail.com
- UPI (only for India): smartherd@okaxis
:: If you want to develop a website or a mobile app, email me your requirement at sriyank.siddhartha@gmail.com :: Free demos provided beforehand ::
- Access my premium courses: bit.ly/sriyank-courses
Free Programming courses:
- Ruby Programming: bit.ly/smyt-r
- Dart Programming: bit.ly/smyt-d
- Kotlin Programming: bit.ly/smyt-k
- Java Programming: bit.ly/smyt-j
- Kotlin Coroutines: bit.ly/smyt-coru
Free Flutter course:
- Flutter App Development: bit.ly/2Rg7EFR
Free Android courses:
- Android using Kotlin: bit.ly/smyt-ka
- Android using Java: bit.ly/smyt-ja
- Android Material Design: bit.ly/2SMJqU6
- Android Jetpack Architecture: bit.ly/yt-j
- Android Multiple Screen Support: bit.ly/smyt-mss
- Android Retrofit: bit.ly/2Ee6GHn
More free programming courses:
- bit.ly/smy-list
Check out my website:
- bit.ly/smartherd
Let's get in touch! [Sriyank Siddhartha]
LinkedIn: bit.ly/sriyank-linkedin
Facebook: bit.ly/smartherd-facebook
Instagram: bit.ly/sriyank-instagram
Twitter: bit.ly/sriyank-twitter
Github: bit.ly/smartherd-github
--- Thank you for your love and support ---
as a Flutter newbie, I can say your video has been really helpful to me, I am very grateful. Thank you !!!
The way you explain is very clear and straight to the point. you deliver the concepts without me having to repeat the video, thank you for your efforts.
Keep, liking and commenting to support. Thanks buddy
very useful and very clear, thanks a lot for your efforts making these tutorials.
Thank sir for sharing. It makes me understand about static use in OOP.
Thanks for the video, nicely explained.
Perfect , beautifully explained
love the way of conveying lecture seriously
fall in love❣❣❣❣❣❣❣❣❣
appreciated sir
thanks bro, it's really helpfull
Thanks a lot sir
THANK YOU
YOU ARE THE BEST
excellent, thanks you
Now start flutter....You can do this very nicely....☺☺😊😊☺☺☺👍👍👍💐💐
In 6m 09 sec
Thanks for Explaining
When we use static and const keyword in same place
Next vedio upload sir....
Please
Seeing Ur vedios getting excitement to learn more......
In 3m 55sec
Thanks for Explaining
Why and When we use Static Keywords
Thanks
I'm waiting for next vedio sir....
Nice tutorial, Can you make videos for intermediate?
Hi Bro
you arent for a long time
I hope u are healthy
when u start again?
Perfect Sir 😊👌👍
Thanks
please teach how to build apps in flutter..
What IDE are u using?
hello sir, can we also use final keyword except const to prevent the changes in the value ?
By using final the value can change during run time but by using const the value cannot be changed during both runtime and compile time.
6:23 you will need heavenly powers to change the value of Pi
lol
HAHA
so whats diff between static and final ???
Sir Your tutorials are great. The only missing thing is the Section end Challenge Projects.
You will get those if you are watching this from the pluralsight :)
@@factworld4375 it must be paid course?
@@GurdeepSingh-gr7fb Definitely
what is class object?
I have a question, how does use non static global variable inside static method?
Hi,
In order to access a non-static variable(instance variable), you will have to create an instance of the class in the static method.
For example :
void main() {
UnPredictableCode.accessRandomText();
}
class UnPredictableCode {
String randomText = "Stay safe";
static void accessRandomText() {
UnPredictableCode code = new UnPredictableCode();
print(code.randomText);
}
}
What is your purpose for trying to use non-static global variable (instance variable) in static method ?
Hope this helps.
Stay safe.
what if we use final instead of static?
class Circle
{
static final double pi=3.14;
static void calculateArea()
{
print("area is calculated already");
}
}
Hi,
There are differences in the way final and const work.
A variable declared as const should have a value that is known at compile time. While a variable declared as final can have its value initialized at run time.
Both const and final variables cannot be modified once initialized.
There is a deeper difference though, when it comes to objects and collections.
Also static keyword is used to make the member(variables and methods) belong to a class rather than a object. Meaning that only once static member is created and shared by all the objects of that class.
When new objects are created, no new copy of static member will be made.
Read through these articles once :
news.dartlang.org/2012/06/const-static-final-oh-my.html
stackoverflow.com/questions/50431055/what-is-the-difference-between-the-const-and-final-keywords-in-dart
Hope this helps.
Stay safe.
Double and Int really use 8 bytes 64 bits
wait double is 4 bytes??
its only an example
same thing....incomplete tutorial....you are assuming that we already know java.
"On this earth" which means you believe in parallel universe ✨
"static" man "static" not "startic" your accent is killing me.