Stateless vs. Stateful | Flutter Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024
  • Stateless vs. Stateful | Flutter Basics
    The main two widgets in flutter are called stateless and stateful widgets. Almost every widget in flutter is based of a stateless or stateful widget. In this video we go into a deep dive into what exactly that is and how it works. When you should use which one? How does it affect the app running?
    Link to the Code:
    github.com/tad...
    Make sure to Like and Share!
    And pls subscribe: shorturl.at/dsIO9
    Thanks For Watching!
    Laptop I use for drawing, recording, and editing:
    Lenovo Thinkpad X1 Yoga: amzn.to/2RqFB8U
    Super cheap, quality mouse. And batteries last forever:
    VicTsing: amzn.to/2UWUimf
    Docking station to keep everything organized:
    Dell: amzn.to/3ea0sao
    Also my favorite book ever, just so more people can read it :)
    Brave New World by Aldous Huxley: amzn.to/3c7o91c
    #flutter #stateless #stateful #widgets

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

  • @rafhaellowixhomwad
    @rafhaellowixhomwad 13 วันที่ผ่านมา

    Direct to the point, easy to understand for beginner level.

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

    Oh man looking back on this 2 years later, this mic did not sound good 🤣

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

    Such a wonderful and practical explanation of stateless and stateful widgets.

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

    ooooh man u got me with the grammar.... at 1:29 Stateless "has no changing state...." and Stateful which "HAVE a changing state"... right there u gained some respect ***** from me.

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

      Haha thanks man! I really try to make it as simple as I can and I’m glad it helps some people 😊

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

    Thanks! The sound is good enough, don't worry.

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

      Awesome! Thank you for the feedback!!

  • @user-hz2ln7ol3t
    @user-hz2ln7ol3t หลายเดือนก่อน

    Very clear

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

    thank you. now this is much clearer.

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

    Ohhh Now i get it! Very help full. Before this video i thought that my whole app will consist of one of those widgets :D And i was thinking which one to use :D

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

      Glad I could help. Video coming on Friday will explain it even more I think

  • @qubee-tech
    @qubee-tech ปีที่แล้ว

    Simple and Understandable. Thank you

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

    Great video. Definitely release more!

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

      Definitely planning on it! My schedule is every Tuesday and Friday. That's as much as I can manage right now

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

    thanks very much, very useful lesson!

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

    Great explained! Thanks

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

    i love you man thx

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

    i want to ask why bool liked =false ?

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

    Thanks for the video! I just wonder why is 'homescreen' stateless? Since the stateful Icon is part of the home screen, so shouldn't that make the homescreen also stateful?

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

      No, only the part of the code that needs to hold state needs to be stateful. So we only want the icon to have state, not the whole screen. This of course doesn't matter too much with a small app, but when it comes to big apps, using less stateless will have a slight bump in performance

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

    Hey bro, Loved the way you explain, first time on this channel, might give it more visits :p Thank you!

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

    best video

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

      Thank you so much!

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

    great video!

  • @Salehalanazi-7
    @Salehalanazi-7 4 ปีที่แล้ว +1

    Great video!

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

      Thank you so much! I appreciate it!!

    • @Salehalanazi-7
      @Salehalanazi-7 4 ปีที่แล้ว +1

      @@tadaspetra i'm not kidding lol, you helped make a weather app. I got the api to set state but the data wasn't showing because I didn't know what I was doing lol

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

      That's awesome. Glad I could help!

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

    Great video but sound is horrible.

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

      Yea this was one of my first ones. I didn’t know what I was doing haha. It’s gotten better now I promise

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

    Your voice need to be higher xD

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

      haha this was when I first started, I think it's a bit better now