Тёмный
No video :(

Life of a Widget?! | Decoding Flutter 

Flutter
Подписаться 576 тыс.
Просмотров 66 тыс.
50% 1

Do widgets have lifecycles? What is a widget, exactly? Learn all this and more as we explore what widgets are and how they fit into the Flutter framework.
Leave us suggestions for code to unravel in the comments below!
Watch more Decoding Flutter episodes → goo.gle/Decodin...
Don’t miss an episode, subscribe to Flutter → goo.gle/FlutterYT
Get started with Flutter → goo.gle/Flutter
Learn more about the Dart Language → goo.gle/2YF9OCi
#DecodingFlutter #Flutter #Developer

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 45   
@1c72
@1c72 3 года назад
I think when most flutter devs talk about "lifecycle" they really mean the lifecyle of Elements, because we do use methods such as "initState" and "dispose" etc. So while this video is "technically correct" (which is the best kind of correct), it's not exactly on point to address those questions :|
@marflage
@marflage 3 года назад
I was thinking the same. I didn't get your comment though. I got the what we as developers think lifecycle methods are part, but not the lifecycle of an element. I do know however that the Flutter team and we refer to different things with confusingly same names.
@noursalman932
@noursalman932 Год назад
​@@marflage Yes the confusion stems from the fact that the word "widget" is sometimes used for "static configuration of UI elements i.e recipe" and other times for the elements themselves.
@DangHoang-di3gk
@DangHoang-di3gk 11 месяцев назад
agree
@sibylsystems5771
@sibylsystems5771 3 года назад
After opening 20 tabs in attempt to understand widget lifecycle today, they post this and it's not even detailed :( I suppose their mindreading abilities are not omnipotent
@loganrussell48
@loganrussell48 3 года назад
What more do you need to know? The last sentence seems to make it clear: widgets don't have a lifecycle. They are either built, rebuilt, or not used. During the building process, flutter calls the build method. When it's rebuilt, it just calls the build method again. When it's not used, the build method isn't called at all.
@niggelgame
@niggelgame 3 года назад
@@loganrussell48 well there is state and the Lifecycle of a therefore StatefulWidget. I know that this is the States Lifecycle, not the Widgets, but especially for new Flutter Devs, this video will probably only be confusing
@hyungtaecf
@hyungtaecf 3 года назад
@@niggelgame The states are no widgets, they are classes that help to keep state of variables, but every time it rebuilds, it rebuilds other widgets, never the same ones…
@loganrussell48
@loganrussell48 3 года назад
​@@niggelgame Even with a stateful widget, the widget doesn't have a lifecycle. A new version of the same type of widget will be built by calling the build method again, with the same mutable state class. It is the changing state class that actually makes the application useful. You can think of the build method as a sort of transformer that takes a data model (state) and transforms it into a usable piece of the application using the build method. Again, there is no lifecycle. Just build methods. Supply something different to the build method, get a differently configured widget returned from the method. When you want to change the widget, change the state of the widget using setState and the widget will update the state, and then the build method will be called again, to generate a new widget, which will fall into the same spot in the widget tree as the last one.
@niggelgame
@niggelgame 3 года назад
@@loganrussell48 yes, that’s what I wanted to say, but I didn’t really. My point was, that for new Devs, the State, which has some sort of Lifecycle, is directly coupled with a StatefulWidget, which may imply a StatefulWidget Lifecycle. That is what I thought until I started taking a closer look at Flutter itself and it is probably what many others think too, which could make this video seem confusing
@idapro9847
@idapro9847 3 года назад
Story about the cake is messed up
@chancefinley2432
@chancefinley2432 3 года назад
Not sure the analogy sunk in easily
@marflage
@marflage 3 года назад
It did not for me. But basically what was conveyed was that every element is rebuilt from the ground up every time there is a change in the state of the current view.
@bbzz
@bbzz 3 года назад
It's still a popular question on the interviews. I always try to tell them that there is no lifecycle but they just count is a wrong answer. One of them even started explaining me why I'm very wrong thinking that there is no lifecycle
@dephinera3502
@dephinera3502 3 года назад
That cake analogy was too abstract... Am I the only one who expected something more technical?
@FlutterKids
@FlutterKids Год назад
I think it makes the video more accessible to different skill levels. If more people can understand the video, doesn't that make it better? 🤔
@rebarius
@rebarius 3 года назад
that was a kind of abrupt end at the end :D maybe a little bit more transition with the bg-music :)
@eliteelitebob
@eliteelitebob 3 года назад
Huh? It seems fine to me. Did they update it?
@user-tv4kh4pc7s
@user-tv4kh4pc7s 3 года назад
Cool title Sound! Like from Santa Barbara series 1984
@thangwss
@thangwss День назад
I have React base. So you only write recipes of each part of the cake. Flutter is the baker, he takes the recipes and bake the whole cake for you (cake now is a set of widgets) and when it's done, it's done. If you need to change the recipe, the baker will examine the recipes and bake parts of cake that need to be 're-bake' and replace with the old version of it from the cake. So widget doesn't have life cycle, butt they can be re built by flutter. Am i right?
@khairulanas
@khairulanas 3 года назад
i love new music background
@franklinoladipo2343
@franklinoladipo2343 3 года назад
Nice video. But how about widgets that extends StatefulWidget, do they have a lifecycle(since you can override initState, dispose, etc) ?
@iilhamwd346
@iilhamwd346 3 года назад
Out of topic but i got uncomfortable when seeing animation at 2:05 😂
@larsien85
@larsien85 2 года назад
He said in last time, "Widget is either build, rebuilt or not used at all". Anyone explain why he said "not used at all"? I guess it means if the widget is already built once then it located in memory and displayed by variable state. Do I get it?
@anmolkapoor1068
@anmolkapoor1068 3 года назад
Nice work
@heshansandeepa9471
@heshansandeepa9471 2 года назад
Very nice
@Smongo412
@Smongo412 3 года назад
Flutter is very intuitive for a React developer like me
@francisgeorge7639
@francisgeorge7639 3 года назад
Don't we learn this pretty nearly out of the gate when first learning about flutter? The problem is the subtle code-interactions between the immutable Widgets and the underlying mechanisms that are explained in impenetrable engineer-speak in the docs. Really I would like to read the source to get a handle on it, but the source is practically unreadable due to the amount of asserts. The flutter plugins to Android Studio etc need a "hide asserts" option.
@user-hy9gb9np6j
@user-hy9gb9np6j 7 месяцев назад
Aren't the videos in this playlist in reverse order? The last video in the playlist is "Introducing Decoding Flutter".
@thephenomenal9348
@thephenomenal9348 3 года назад
Make installation Of futter smooth and flexible like installation of all files in other drive in just on folder with nested folder. Give options to completely installation of gradle, SDK, emulator, plugin in one folder with flexibility to choose drive.
@ehsanhasin8092
@ehsanhasin8092 Год назад
thank you for your example 🥞
@ItsLarry
@ItsLarry 3 года назад
Nicely baked video 😉😂
@youdube1203
@youdube1203 3 месяца назад
so Element is responsible for rebuild and update state
@yosoydeux
@yosoydeux 3 года назад
Me gustaría una forma de que mi aplicación recibiera eventos desde RU-vid, ¿alguien me puede ayudar?
@clarkkent1473
@clarkkent1473 2 года назад
TIMEY WHIMEY WOBBELY STUFF !!!!! DOCTER WHO
@UsamaKarim
@UsamaKarim 3 года назад
We might understand it well if we came from Android or iOS
@OsamaAsif
@OsamaAsif 3 года назад
Cool🔥
@remarkable_bee
@remarkable_bee 2 года назад
cool.
@BrendansReasons
@BrendansReasons 3 года назад
I'm gonna have to say no to this jingle
@zulfiqarawan3407
@zulfiqarawan3407 3 года назад
Kind of Right. But incomplete. Widgets are immutable but element is mutable and kind of lifecycle of widget
@katekko1
@katekko1 3 года назад
:o
@MichaelLinggardjati
@MichaelLinggardjati 3 года назад
I WANT IT BOS
@md.rahamatullah4808
@md.rahamatullah4808 3 года назад
:)
@pedropeterle6380
@pedropeterle6380 3 года назад
frist
Далее
Hot reload?! | Decoding Flutter
2:16
Просмотров 44 тыс.
Learn Flutter Life Cycle In 10 Minutes
10:02
Просмотров 74 тыс.
Cute kitty gadgets 💛
00:24
Просмотров 12 млн
When to Use Keys - Flutter Widgets 101 Ep. 4
9:40
Просмотров 503 тыс.
Pragmatic State Management in Flutter (Google I/O'19)
33:25
Unbounded height / width | Decoding Flutter
4:54
Просмотров 138 тыс.
Null safety in Dart - Introduction
5:27
Просмотров 163 тыс.
How Flutter renders Widgets
26:50
Просмотров 187 тыс.
What is State?
6:54
Просмотров 112 тыс.
Async/Await - Flutter in Focus
9:11
Просмотров 205 тыс.
Top 30 Flutter Tips and Tricks
6:50
Просмотров 550 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 354 тыс.