Widgets vs helper methods | Decoding Flutter

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024
  • Flutter developers are well-acquainted with widget build methods that grow, and grow… and grow. In this video, Craig Labenz compares two different ways to break up those unwieldy build methods; and how the best option may be different than what you originally suspected.
    See the differences in action in these DartPads:
    Managing rebuilds with nested const widgets → goo.gle/3yallg1
    Managing rebuilds with nested non-const widgets → goo.gle/3IyafpM
    Preventing errors with separate widgets → goo.gle/3dDrR5o
    Helper methods can create a requirement for Keys → goo.gle/31HlnQB
    Get started with Flutter → goo.gle/Flutter
    Learn more about the Dart Language → goo.gle/2YF9OCi
    Watch more Decoding Flutter episodes → goo.gle/Decodin...
    Don’t miss an episode, subscribe to Flutter → goo.gle/FlutterYT
    #DecodingFlutter #Flutter #Developer
    product: Flutter - Development - User interface;

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

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

    thanks, that was so important to me i used helper methods, but from now i will use classes

  • @OKOK-hm2is
    @OKOK-hm2is 2 ปีที่แล้ว +10

    Greeeat video, it helped me a lot!
    As a novice in flutter I've started to use different classes for widgets right from the beginning as it felt logical for me. But watching more and more tutorials I've found out that people in them use helper method extensively and switched to that approach as it seemed easier to transfer data that way.
    Now, this video put thing in correct perspective and explains why it's not the best way

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

    Key takeaway
    1. Use classes instead of helper functions
    2. Use const constructor wherever possible
    anymore ?

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

      Thankyou so much !

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

      maybe make use of lint for the const constructor best practice

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

      this is not true sometimes helper functions more useful. you should watch this tutorial.

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

      @@nielfollero5 why head to not go to?

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

      @@longkhanh8544 It basically means the same

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

    At least in VSC, the "refactor selected code to separate widget class" will notice variables defined out of scope, and automatically add them as parameters to the new class, providing the proper linkage at the original site. It stunned me the first time I tried that and it just worked. :)

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

      know your tooling first

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

      Ya , Intellij supports that too, would be better to have the class created in a new file though. Dont hv that yet

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

      I didn't know this existed! Thanks for mentioning this great tool!

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

      This is so underrated, I felt like I could have saved so much of my time when I got to know about this.

  • @myavuzokumus
    @myavuzokumus 8 หลายเดือนก่อน +2

    I was editing the widgets today and I was confused about the difference and this video helped me, thanks!

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

    That was just soo helpful! As a new flutter developer, I just can't underestimate the value of such and advice!

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

    Ah crap, I need to rewrite a few things. Thanks! Backlog item added

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

    Thank you for yet another great video! I knew about it, but it's always good to refresh in memory.
    The only thing I don't like is `const` keywords everywhere.
    Okay, we don't have that annoying `new` keyword, but we have to print `const` again and again. Is it really that difficult to make the compiler smarter, so it would automatically add consts in front of widgets? If it already has a lint, suggesting const, why not to get rid of `const` in front of constructor and make a compiler to add it when app is building?

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

      This couldn't agree more with you.
      Having to wrote `const` constantly is pretty annoying.

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

      Fully agree. If a constructor is already marked ‘const’, I don’t see why the compiler can’t quietly infer const wherever that constructor is invoked.

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

    I liked the video just for 3:49

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

    Very articulate and concise delivery!

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

    So, using classes is better than using helper methods.
    Ok, but is this a big difference?
    If it is not, I would prefer to use helper methods in general for smaller sub pieces of UI.
    Because using classes for these small things means you will have a huge amount of classes (all of which you have to try to name correctly), and a larger percentage of your codebase will be boiler plate.

  • @강수경-j1b
    @강수경-j1b 2 ปีที่แล้ว +2

    Thank you for korean subtitle!!

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

    What about if you use a global state management package like GetX or state rebuilder? Doesn't that mean that only the reactive part of the widget tree is rebuilt on state change?

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

    Very nice explanation

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

    I've always used separate widgets without knowing all these advantages.

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

    I perfer using helper method when I am using bloc for state management but when using stateful widget and when using setstate seprate class is better.

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

      What is the connection between the bloc and the methods that the widgets return? The essence of the video is different

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

      @@alexfokin4182 let me clear you. When we use bloc builder only the parts that need to change state is updated and that time we can use helper method as re render of whole ui is not done with the help of bloc builder as setstate is not used.

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

      @@KingLeoMessi Of course, everything returned by the BlocBuilder is re-rendered, so it's important to remember that helper methods embedded within that block of your code will incur all of these trade-offs :)

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

      I agree with you. We can specify which widget need to be rebuilt by wrapping it with BlocBuilder, BlocSelector. Helper methods now make our code is easy to read and maintenance.

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

    Rémi 🥖 🇫🇷 rocks 🥇💪😁

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

    I never thought about performance and testability but I always preferred NewWidgets instead of helper methods as it looked more natural to do in platform like flutter.

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

    So I feel there is one catch, what if we are not using setstate inside that sub widget ? than I guess there should not be any problem in performace and we can use function there instead of new widget. everyone do share your views if I missunderstood anything here.

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

    I've always used separate widgets. If I need to use a callback, I declare a property for that

  • @AJ-dy2bt
    @AJ-dy2bt 2 ปีที่แล้ว +2

    This is the case only for Stateful widgets or does it apply to completely Stateless widgets as well?

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

    but what if we didnt have any setState inside the helper method ? is it still okay to use helper method ?

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

    Is there any scenario where helper methods would be a better choice than use a class?

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

    It's not a few key presses. The new class cannot share state, so it's passed or some kind of global state management is used. Either way small trivial functions can turn into large complex classes to save some redraw time. I think is more important to understand the tradeoff's and select the correct solution rather than one is better than the other.

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

    I never really liked too many lines of code in a single file. I believe that’s my unintentional love for class based widgets

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

    Classes are always great since you can isolate them to a separate file. As your app grows bigger and complex, it becomes easier to fix bugs when things are isolated. The logic is also easier to follow when code is broken down instead of having over 2000 lines in a single file

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

      top level functions are no different in this aspect

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

      I couldn't disagree more. Lots of tiny source files makes the code a major pain to navigate through.

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

      @@pianoman16 it's not painful if you give classes understandable names and use IDE's functions to navigate to type definition for example :)

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

    Great Video! I have one minor addition. We can actually convert helper methods to generated widgets via functional_widget package.
    This way we get rid of both new class boilerplate and side effects of helper methods.

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

      Why use yet another package when you can just right click and refactor to a class automatically. Not sure what IDE you use but android studio does this out of the box

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

      @@thefamousdjx you have a very good point on this but adding new params or debugging properties makes classes longer and I have a feeling of writing boilerplate code unnecessarily. Therefore, I use this package :)

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

      There are some annoyances that come with that package:
      - you have to run build_runner every time you open a project
      - files get generated next to classes and start to clutter your project
      - there is a way to tell build_runner to generate files in special folder 'generated',
      but moving files around project can break imports and you have to restart whole build_runner
      - doing 'extract widget' from context menu will still create class widget and you'll have to spend some time
      deleting code and replacing it with functional widget syntax
      - similarly, if you press F12 to see implementation of functional widget, you'll end up in generated file instead of
      actual function
      After summing all this things up I realized it's unfortunately not worth doing it to save couple of lines. It's a great idea though, and I hope there will be better solutions in the future.

    • @Apenschi
      @Apenschi 4 หลายเดือนก่อน

      @@avalanche2073 And other devs need to know the package in order to understand your code

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

    Yay! I choose the right option then 🙃

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

    Great video! I want to add that naming your helpers or classes well is very important!

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

    I love the way he made us follow along 🤣.... I was just saying Yes, True, Ohhh That's true 😅

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

    In some scenarios, a widget class can significantly out perform its corresponding helper function. In the scenarios where helper methods out performs widget classes, the performance advantage brought by helper functions over widget classes tends to be marginal. Plus other benefits of using widget class, if you want a no-brainer decision, using widget class seems a better bet.

  • @Dave-dl8ey
    @Dave-dl8ey 2 ปีที่แล้ว +1

    Me: runs back to keyboard to refactor all the code i just wrote yesterday 😬👍

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

    Some of Dev's are writing separate methods to call setState inside Statefull widget easily
    If Dev's write seperate widgets then they lost access to setState()
    To solve this, need one provider to each screen.but Dev's are feeling not to write much code bcz of their timelines

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

    I always used to use class constructors, because it makes code looks more readable and clearer for me. It's happy to hear that there are more valuable advantages too 😊.

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

    I needed this

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

      We're happy to hear that this was so helpful! Be sure to check out the links in the description for more tips and tutorials 🙂

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

    is extracting widget in a variable is a good choice,??? Please reply .

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

      No it isn't. It goes against Flutter's philosophy of fast rebuilds.

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

    Very well said.

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

    Reusability

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

    In my opinion it's not that black and white, if you use a loop for something, as long as all the widgets inside that loop don't require any state and the tree is not too large, it's probably fine to use a helper method, because they will never trigger a rebuild, so like with many things, which is better depends, but for the sake of simplifying things, always putting things inside a widget is probably a safe choice

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

    Geez wish someone told me this 3 years ago! I started with dozens of helper functions, slowly started using seperate widgets so the dart file wasn’t 2000 lines long. Still have a lot of refactoring to do 😅

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

    Thank you. That was very important information

  • @CuongNguyen-ut4kr
    @CuongNguyen-ut4kr 13 วันที่ผ่านมา

    What happen if my helper method returns a BlocBuilder reflecting changes from a bloc state? Theres no setState used at all.

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

    I also had thoughts about this topic. I started using separate classes for widgets but main problem I face with that is passing variables and callbacks are a bit challenging.

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

    That's kinda counterintuitive for a React Developer, where functional components (aka widgets) are preferred over class components. Would be great, if Flutter could somehow elevate functional widgets (aka helper methods) to the same level of performance as class widgets.

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

      Hi, fellow flutter and react developer here. In flutter, functional components are actually Stateless Widget, whereas Class based component are Statefull Widget. Helper methods are not functional components. Rather they are methods that you can define in your functional component. We don't do that in functional component either. We just break our functional component before return function.

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

    Very precious information 🤯

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

    i wish there was some way around this. helper methods make things so much easier
    if i have to create classes i have to pass in parameters and all code is more verbose

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

      But usually helper methods require parameters too. Like context etc...

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

    I've been looking for this video for a while. Now I got it clear. Thanks👏

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

    This is a extrenely valuable information. Thanks

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

      We appreciate your positive feedback, Heshan 🙌

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

    I really love the intro music!
    can I have the full version? Hahaha

  • @sarhansoft8563
    @sarhansoft8563 5 หลายเดือนก่อน

    I think the good benefit from classes is respectability in different widgets. But it look like more than that. anyway I always use that way.

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

    So making a new class that extends stateless/full widget for your widget is better than making a separate method in the same class to return a widget(helper)?

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

      It only helps in the example, as the favorite icon is a stateful widget than can uodate itself

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

      @@adamyong6766 so if my widget is stateful. Better to make a separate class for it. But if stateless, its ok to use method(helper)?

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

      @@bluesilhouette6748 It doesn't matter if the widget is stateless or stateful. It's always better to use widgets than helper methods from the performance point of view.

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

      @@mivoligo "always" is a very strong argument. Any supporting data?

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

      @@guangyuchen7275 sorry, I'm sure I've used the word "always" incorrectly. There must be a way to worsen performance using widgets. :) I just wanted to emphasize that it doesn't matter is the widget is stateful or stateless. Flutter is optimized to use widgets and not functions returning widgets.

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

    Thank you so much for this video. Was really eye opening and taught me something new!!

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

    Great video. Thanks

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

    I use methods to format code. So should I use classes for formatting also? I like it being seperated bcoz it makes me reading it easier.

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

    Nice!

  • @Kim-by5uy
    @Kim-by5uy 2 ปีที่แล้ว

    Well damn, guess i'll have to refactor my entire app

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

    Thanks so much.
    Help me from the end of death on boilerplate coding.
    😁👍

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

    Yo me había preguntado eso. Gracias amigo

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

    Though this is not the right platform to ask...I am struggling in building an android app with flutter.. apk is not building.. There is an error in build.gradle file.. It says
    could not resolve properties..even stack overflow could not resolve my query

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

    Next time wear a Batman like mask :D

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

    What about using extension methods that wraps the original widget? Text('Hello').padding(8)

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

      style_widget package uses that heavily...one of my most favorite!

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

      @@markdioneeb8997 this approach might suffer from the issue discussed in the video because it's just a method returning a widget.

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

    Nice video ❤️❤️

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

    Interesting that this video mentions Remi but doesn't mention his library `functional_widget` which basically turns a Widget function into a class via code generation. This is basically what I use. You get all the benefits of a class as mentioned in the video with the terseness of a Widget function.

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

      Because there's no need for a library when android studio already has this feature by simple right clicking and converting to class

  • @azmanbarraquias6707
    @azmanbarraquias6707 2 หลายเดือนก่อน

    the link is Error: Page not found, Please update.

  • @jongwoolim616
    @jongwoolim616 5 หลายเดือนก่อน

    You are awesome. Always thankful for your explanation.

  • @aidarkhabibullin2906
    @aidarkhabibullin2906 6 หลายเดือนก่อน

    Great explanation!

  • @a.belenky4490
    @a.belenky4490 ปีที่แล้ว

    Minimizing dropped frames is nice but the real benefit is the power consumption. The vast majority of devices can run resource intensive apps effortlessly, but the power consumption is greatly affected. Making efficient apps is more for the battery life than for performance nowadays (although it's always good having faster apps as well)

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

    how about if we use getx?

  • @thongm.truong459
    @thongm.truong459 ปีที่แล้ว

    That's really nice

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

    "helper method" is vague in meaning I'd like to use "a function which returns widget"

  • @AnonymousAnonymous-nr8su
    @AnonymousAnonymous-nr8su 2 ปีที่แล้ว

    It is sad that const won't work with any localisation approach and most of the endpoint widgets in the widget tree brunches are Text.

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

    Great video! So many good things coming from Flutter

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

    Tried to apply this principle to create a countdown function but for some reason setting state in the countdown widget (which should only redraw the text every second) triggers a rebuild of its parent widget. Can't figure out why,

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

    Thanks! Although I knew it already I needed to hear it from the flutter team again 😅!

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

    Thank you for tehe video!

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

    I was using the the helper method approach... But from now, I will use another class to wrap my Child widget build methods....
    Thanks for the insight... Much appreciated...

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

    excellent exhibition, and I will not tire of asking for it. In Spanish, please. Thank you

  • @Thanho-nb6mt
    @Thanho-nb6mt 2 ปีที่แล้ว

    thanks, i understand more something from your video!!!!

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

    StatefulBuilder?

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

    thanks ☺️☺️☺️

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

    Thanks! I’ve been approaching the limits of readability in my current project and the „refactor widgets“ todo has been getting more and more priority recently. Now I know what to look out for :)

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

    Very good content, for everyone involved you are awesome. 👨🏻‍💻 🚀

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

    is there a possibility that flutter will have a drag and drop method to create app in the future?

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

    Why not use stateful builder with the helper widget?

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

    Thanks

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

    Not to mention that list of class instances look better than helper methods

  • @shourya-shikhar
    @shourya-shikhar 2 ปีที่แล้ว

    Solved the biggest confusion I was having. Thanks

  • @hamza-325
    @hamza-325 2 ปีที่แล้ว

    I am still a Flutter intermediate programmer so I don't know much about performances, but I never liked that helper method style. I always use the classes way because it feels more natural (at least to me).

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

    I hope flutter / dart one day move to functioning programing, i hate classes so much boiler plate

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

    i like your explanation style and pace... slow and clear with simple examples , makes it really easy to absord

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

    Hi Flutter Shy

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

    Thanks Craig. Very important video indeed.

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

    Hi! Thanks for this video. What theme and font u use?)

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

    Amazing

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

    Been curious about this issue for a while now, you hit the nail on the head as always, thank you Google

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

    Super video. Great good practice.

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

    So relieved I have had developed a habit of separating widgets

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

    this is the first time i heard about helper method.

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

    what about StatefulBuilder?

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

    Thanks! These videos is really helpful!
    I was in doubt about to separate the widgets (like Text('Hello');) in local variables, if it is also a bad idea... Another doubt is if for example I have a Widget with a lot of params, can I pass these params to another Widget using its instance? Like: WidgetWithALotParams(SomeChildWidget(parent: this)); (then the SomeChildWidget will have access to all WidgetWithALotParams params)

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

      create models for passing a lot of parameters