How to Create Stateless Widgets - Flutter Widgets 101 Ep. 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

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

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

    wandered through lots of articles and books to learn flutter, but this single instruction is just better than those.

  • @KenPetri
    @KenPetri 6 ปีที่แล้ว +9

    Good to see short, concise but technical explanations of Flutter. Please cover the semantics widgets (for accessibility) at some point in the series.

  • @TashingaPemhiwa
    @TashingaPemhiwa 5 ปีที่แล้ว +40

    5:07 should be StatelessElement

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

    These series will be really helpful, loving flutter more and more every day, good job!

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

    It's worth mentioning at the end that the body of the build() method for DogName could be simplified to return a single Container widget with a Text child.

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

    Hello everybody ! These videos are pretty awesome and explain the details perfectly. We want to have a lot of videos like this, thank you GOOGLE, thank you all !!!

  • @BO-nn9up
    @BO-nn9up 2 ปีที่แล้ว

    Just can say 4 words for his explanations Simple, Quick, Useful, Exciting

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

    Great video! A quick suggestion... take advantage of the IDE's "wrap a widget" and "add padding" features (Cmd-.). This also works in VSCode, which makes editing the Flutter code so much easier! Keep up the great work! Looking forward to the series!

  • @Peter-Franz
    @Peter-Franz 3 ปีที่แล้ว +1

    10/ 10 good teaching - the reveal at the end had me shook

  • @themorbidhero2987
    @themorbidhero2987 6 ปีที่แล้ว +10

    Flutter is the Future!

  • @YasinIlhan61
    @YasinIlhan61 6 ปีที่แล้ว +35

    This series will be good :) Thanks.

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

    Thank you so much for all of this flutter stuff. If y'all could, hurry it up so I can finish my school project faster. xD

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

    Hope these come in faster than once a week. Thanks for the vid.

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

    This tutorial series has helped me a lot to understand the differences between stateless widget and stateful widget but I have seen use cases where both are implemented at a time an example use case is where a stateless widget was created first with a home method that calls the stateful widget class. Please I would like to understand why are stateless widget used to call a stateful widget class and why are both used at the same time. This may be a dummy question but it has been a question I had searched on Google and got no answer

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

    Been some time developing apps on Flutter. Sometimes I think how the hell could it be soo easy :). Good job Google.

  • @lone.wo1f
    @lone.wo1f 5 ปีที่แล้ว

    Hope this series continues..

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

    This is really exciting. It seems very easy to build complex apps across platforms. I will try it out to justify this.

  • @Smart-workers.VS.Hard-workers
    @Smart-workers.VS.Hard-workers 3 ปีที่แล้ว

    Nice presentation bro… Thanks a lot bro

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

    Really amazing brother.
    Glad to learn flutter from people like you. simply wounderful 🙌🙌❤❤❤❤❤❤

  • @イッヌ-y7e
    @イッヌ-y7e 3 ปีที่แล้ว

    Thank you! 😊
    I watched it today.

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

    Thank you for the helpful explanation

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

    why make a difference between stateful and stateless or why split i should say? join them together and then add a switch or boolean that you can set to stateful or stateless, seems like extra work coding wise for something that can just be specified with less code. but whatever, i am not on the flutter dev team. thanks for sharing.

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

    beautifully explained.

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

    Please release new videos daily or three times a week. Thx

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

    Hey Flutter Team, from what I see soon you'll end up publishing hundreds of videos. please have your own channel and create playlists. It would be easy to keep track of videos. This is the right time to begin with!!

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

    Flutter is going to be future ❤️

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

    Awesome series

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

    Nicely explained !

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

    Flutter rocks, keep up with the good work!

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

    Flutter is great... I can't wait for the new videos ...

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

    Short and to the point.
    I hope I will be a member of any department in Google in the nearest future.

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

    Excellent video

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

    Defining a const constructor doesn't make every instance of the class a constant, you need to to actually initialise it with the "const" keyword, e.g "const DogName('Nico')"

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

    when the next video will be published , is it like the widget series each week ?

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

    Thanks. Flutter is an interesting framework

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

    Element tree doesn't show 'what actually on screen' , it only have reference/location to that current build widget.
    RenderObject Tree is the actual representation of the screen. RenderObject is created by using configuration details from widget and reference details from element.
    (RenderObject = widget(configuration details) + Element(location details)).
    This how I understood about flutter framework, But after watching this video i'm get confused.
    (Am I right or wrong?)

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

    good job

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

    I am a fan of flutter in China. Can I translate this series of videos and upload them to the Chinese website (purely sharing, no profit)? For some well-known reasons, it is difficult for Chinese developers to see these excellent official flutter videos.

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

    New to this, totally lost, will it get easier?

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

    Why are they always using sizedbox in these tutorials, isn't there MainAxisAlignment.spaceEvenly for this?

  • @plutterpluttery3256
    @plutterpluttery3256 5 ปีที่แล้ว +9

    *'adding a padding widget'*
    He is rhyming...

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

    Great! can't wait for the Statefull widget vid :D

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

    Can't wait to use Flutter

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

      u're late man

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

    Perfect. I got it.
    Thank you!

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

    Perfect, really very nice, thanks alot.

  • @TectonicPlate-gu9bs
    @TectonicPlate-gu9bs ปีที่แล้ว

    On 5:08 it is said "stateful element then says, hey, I" why stateful? I thought we were seeing stateless widgets and elements!

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

      Hey there! 🎶 In that particular moment, the mention of "stateful" refers to a concept in music production and not related to widgets or elements. 🎵 If you have any more questions or need recommendations, feel free to ask! 😊

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

    Keep there videos coming!!!

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

    Very nice

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

    Great Video. Thks

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

    讲的太好了,虽然我一句也听不懂

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 5 ปีที่แล้ว

    Stateless, Stateful, Element, etc. Can anyone provide a link that can explain this for dummies. Hard to get my head around such abstract concepts.

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

      abstract? stateless means things doesn't change inside that widget, stateful means you would want to listen to when the values inside that state changes.

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

    Great job!

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

    How can I learn flutter/dart in a simplified manner?

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

    very useful

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

    A visual of the finished product would help

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

    Thanks !

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

    How u emulate an iphone on Android Studio bro?

    • @alexr.4409
      @alexr.4409 5 ปีที่แล้ว

      It's flutter

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

      Using Flutter Inspector, you would select 'Toggle Platform' to switch between Android and iOS emulation

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

    What's about performance? We have a lot of StatelessWidgets inside each other and this number of nesting elements will increase .

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

      In most cases, an app can be pretty smart about only rebuilding the widgets it has to when data changes, so most updates only produce a few new widgets. Because Stateless widgets are constants, you can also do things like reuse them at multiple places in the Element tree or cache them for repeated use.
      The team just added some new features to the IntelliJ/Android Studio plugins that report on performance stats, if you're curious about how well one of your apps is performing: groups.google.com/forum/?linkId=52478434#!topic/flutter-dev/oJ55FjL5Izc

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

    not able to visualize the tree structures :(
    pls include more animation .

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

    Sized Box seems more like a hack, rather a good design principle. Can we achieve this without Sized Box?

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

      There are several ways to space things out in a column, including the use of a Padding widget. I recommend having a look at the catalog of layout-related widgets on flutter.io, which has a bunch of options: flutter.io/docs/reference/widgets/layout

  • @Akua-hx3rb
    @Akua-hx3rb 4 หลายเดือนก่อน

    So I have been working on Flutter soon 2 years but I still don't understand. So you made a parent that it is a Stateless but then you have children widgets that they are mixed with Stateless and Stateful. So you say that if I wanna get data and re-render a widget I should call Stateful.. but my parents is in Stateless. I wish that Flutter can make Stateless and Stateful in to *one* because this give me so much headache and helps us to code better.

  • @ArturKlesun-zq7ns
    @ArturKlesun-zq7ns 4 ปีที่แล้ว +1

    this stare scares me...

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

    Why we don't use native code like Swift? I'm a developer in IOS for 4 years, I can do everything, This kind of framework create less required of the customer.

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

    This content is great but i was searching for a long time to find them maybe a new desing in the order in your channel could be help ;)

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

    So put stateless widgets inside a stateful widget is one way of handling rebuilding stateless widgets.

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

    omg please blink...

    • @blktux
      @blktux 5 หลายเดือนก่อน +1

      he did it in 3:04

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

    please create chanel Google devloper indonesia. indonesia lugage

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

    thanks dude . i just newbie. how i'll be master.

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

    Composition > Configuration.. wow google is really several steps ahead of MS.

  • @mokhefiabdelkrim3815
    @mokhefiabdelkrim3815 6 ปีที่แล้ว +7

    I found this really complicated for this simple interface

    • @devithuotkeo
      @devithuotkeo 6 ปีที่แล้ว +5

      Practice and exploring will make that complication goes away ;)

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

      I think it's pretty simple compared to an arcaic XML file...

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

      sometimes its better to compare it to HTML. first you have to make a bunch of divs, or say UL, LI LI LI, then you have to go set a class, make a new CSS file, link it into your HTML doc, then make a class and share it with the 3 elements, then make CSS code for that class that has the padding and color and etc.. so you could argue that its complicated in everything if you know nothing, but those that know what to do see it as simple. it only becomes simple with memorization and memorization happens with practice.

    • @Alex-vi6fr
      @Alex-vi6fr 5 ปีที่แล้ว +1

      @@TheVictorotciV XML is far easier than this in my opinion

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

    El que no apunte aprender Flutter que se dedique hacer Galletas...

  • @alexherrera4763
    @alexherrera4763 5 ปีที่แล้ว +1

    this is so confusing compared to making an app traditionally in Java (understanding how it works, what does what, and how things are related) 🙄😂

    • @jasongoossens
      @jasongoossens 5 ปีที่แล้ว +1

      Spend some time following tutorials and you'll be set!

  • @RolandPogonyi
    @RolandPogonyi 5 ปีที่แล้ว +6

    It's very confusing to call a widget "stateless". It has a state. The one it was created with. It should've been called ImmutableWidget or something more accurate.

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

      This is a late response but all Widgets (Stateless / Stateful) are actually immutable. You cannot modify Widget objects once initialised. That's why the build method exists: To rebuild the Widget when a change is made.
      State here is a class that stores properties of the Widget that can change.
      Stateful Widgets store an instance of this State class. Again, Stateful Widgets are immutable, so they hold onto that same State object, but State is mutable.
      That State object is where all the modification happens. Essentially the properties inside the State object are the current "state" of a Widget.

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

    Pog!

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

    Nyc google

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

    Nice video :) think about putting music in the parts where you dont speak so there won't be any awkward pauses xD cheers

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

    Please, I need subtitles in Korean.

  • @ElGuapoSalsero
    @ElGuapoSalsero 8 หลายเดือนก่อน

    So I kind of get why Flutter is popular and look past the overtly complicated syntax, but man the documentation is terrible to navigate. I cannot easily find all of the different declarations and how they should interact let alone the different options to use for styling for example. I should be able to read the documentation without watching videos.
    For example. How do I know that SizedBox() exists, or that mainAxisAlignment is an attribute for Column() and what alignment options are available? The Flutter documentation do not easily provide these. I have to bounce between different pages within the Flutter documentation to finally find it AND it just lists a few options for Column() which are the most popular. Good documentation is how W3 schools made it available.

    • @ElGuapoSalsero
      @ElGuapoSalsero 8 หลายเดือนก่อน

      OK Apologies. I just saw you call it the Flutter API reference documentation where all of the packages are listed with every single option in there. It was tough to find but I can finally get everything I need.

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

    In this video, the speed at which you write the code is too slow. You should make it so fast that our eyes can't follow it. Do you really think a beginner can follow this video at that speed?