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 ---

ความคิดเห็น • 46

  • @DanielHenryThomas
    @DanielHenryThomas 5 ปีที่แล้ว +22

    as a Flutter newbie, I can say your video has been really helpful to me, I am very grateful. Thank you !!!

  • @ammarsinan2706
    @ammarsinan2706 2 ปีที่แล้ว +4

    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.

    • @smartherd
      @smartherd  2 ปีที่แล้ว +1

      Keep, liking and commenting to support. Thanks buddy

  • @aladdinovich
    @aladdinovich 5 ปีที่แล้ว +2

    very useful and very clear, thanks a lot for your efforts making these tutorials.

  • @maniamadrid
    @maniamadrid 5 ปีที่แล้ว

    Thank sir for sharing. It makes me understand about static use in OOP.

  • @SyedHaroon786
    @SyedHaroon786 4 ปีที่แล้ว

    Thanks for the video, nicely explained.

  • @saivishnu725
    @saivishnu725 4 ปีที่แล้ว

    Perfect , beautifully explained

  • @yousafahmad896
    @yousafahmad896 ปีที่แล้ว

    love the way of conveying lecture seriously
    fall in love❣❣❣❣❣❣❣❣❣
    appreciated sir

  • @hilmy7822
    @hilmy7822 4 ปีที่แล้ว

    thanks bro, it's really helpfull

  • @rafiksiddique3826
    @rafiksiddique3826 2 ปีที่แล้ว

    Thanks a lot sir

  • @milvanfoi7905
    @milvanfoi7905 5 ปีที่แล้ว

    THANK YOU
    YOU ARE THE BEST

  • @lewisburgos9799
    @lewisburgos9799 4 ปีที่แล้ว

    excellent, thanks you

  • @JK92007
    @JK92007 6 ปีที่แล้ว +1

    Now start flutter....You can do this very nicely....☺☺😊😊☺☺☺👍👍👍💐💐

  • @karthickrajalearn
    @karthickrajalearn 4 ปีที่แล้ว +3

    In 6m 09 sec
    Thanks for Explaining
    When we use static and const keyword in same place

  • @rajeshkumarmajhi2845
    @rajeshkumarmajhi2845 6 ปีที่แล้ว +1

    Next vedio upload sir....
    Please
    Seeing Ur vedios getting excitement to learn more......

  • @karthickrajalearn
    @karthickrajalearn 4 ปีที่แล้ว

    In 3m 55sec
    Thanks for Explaining
    Why and When we use Static Keywords

  • @Sagliyu
    @Sagliyu 6 ปีที่แล้ว

    Thanks

  • @rajeshkumarmajhi2845
    @rajeshkumarmajhi2845 6 ปีที่แล้ว

    I'm waiting for next vedio sir....

  • @furkanvatandas4819
    @furkanvatandas4819 6 ปีที่แล้ว +1

    Nice tutorial, Can you make videos for intermediate?

  • @SeraphimTech_io
    @SeraphimTech_io 6 ปีที่แล้ว +3

    Hi Bro
    you arent for a long time
    I hope u are healthy
    when u start again?

  • @krishnakumarramachandran5888
    @krishnakumarramachandran5888 5 ปีที่แล้ว

    Perfect Sir 😊👌👍

  • @AshishGautam-sy3vm
    @AshishGautam-sy3vm 6 ปีที่แล้ว

    please teach how to build apps in flutter..

  • @christiananaks16
    @christiananaks16 11 หลายเดือนก่อน

    What IDE are u using?

  • @sagarkumar-ns3gr
    @sagarkumar-ns3gr 4 ปีที่แล้ว +2

    hello sir, can we also use final keyword except const to prevent the changes in the value ?

    • @aravindc6946
      @aravindc6946 3 ปีที่แล้ว

      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.

  • @javierrotjes6013
    @javierrotjes6013 4 ปีที่แล้ว +4

    6:23 you will need heavenly powers to change the value of Pi

  • @creative-commons-videos
    @creative-commons-videos 5 ปีที่แล้ว

    so whats diff between static and final ???

  • @GurdeepSingh-gr7fb
    @GurdeepSingh-gr7fb 5 ปีที่แล้ว +2

    Sir Your tutorials are great. The only missing thing is the Section end Challenge Projects.

    • @factworld4375
      @factworld4375 5 ปีที่แล้ว

      You will get those if you are watching this from the pluralsight :)

    • @GurdeepSingh-gr7fb
      @GurdeepSingh-gr7fb 5 ปีที่แล้ว +1

      @@factworld4375 it must be paid course?

    • @factworld4375
      @factworld4375 5 ปีที่แล้ว

      @@GurdeepSingh-gr7fb Definitely

  • @flutter4525
    @flutter4525 2 ปีที่แล้ว

    what is class object?

  • @juanmanuellopez4511
    @juanmanuellopez4511 4 ปีที่แล้ว

    I have a question, how does use non static global variable inside static method?

    • @attimeequalszero6750
      @attimeequalszero6750 4 ปีที่แล้ว

      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.

  • @tanaysingh9124
    @tanaysingh9124 4 ปีที่แล้ว

    what if we use final instead of static?
    class Circle
    {
    static final double pi=3.14;
    static void calculateArea()
    {
    print("area is calculated already");
    }
    }

    • @attimeequalszero6750
      @attimeequalszero6750 4 ปีที่แล้ว

      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.

  • @JDArtagnanAO
    @JDArtagnanAO 5 ปีที่แล้ว

    Double and Int really use 8 bytes 64 bits

  • @MinhThu-nj7zi
    @MinhThu-nj7zi 5 ปีที่แล้ว

    wait double is 4 bytes??

    • @warhead3030
      @warhead3030 5 ปีที่แล้ว

      its only an example

  • @learnwithshash1475
    @learnwithshash1475 2 ปีที่แล้ว

    same thing....incomplete tutorial....you are assuming that we already know java.

  • @thecollective2404
    @thecollective2404 3 ปีที่แล้ว +1

    "On this earth" which means you believe in parallel universe ✨

  • @mashakozlova9425
    @mashakozlova9425 3 ปีที่แล้ว

    "static" man "static" not "startic" your accent is killing me.