As a flutter developer, you have at least once come across a question of how would you draw a line between Stateless and Stateful, either this question would have been thrown on you or it has hit your mind hard by self-realization. However, it does not matter from where you get stuck here but the main point is…… Do you have any answer to it ??

Of course in search of this mysterious question, you would find that self-proclaimed complete definition on google which is…

If a widget can change — when a user interacts with it, for example — it’s stateful. A stateless widget never changes. Icon , IconButton , and Text are examples of stateless widgets. … A widget’s state is stored in a State object, separating the widget’s state from its appearance.

But if you have ever been a part of a discussion or have appeared for an interview (like me) then you must be aware that the conversation over stateless and stateful does not end here.

whaaatttt… ???_ yes, the conversation does not end here._

After giving this definition a question arrives if the stateless widget has a stateful child what it would be called? Does it become a stateful widget or how it manages itself?

So….In the layout, if we choose there can be different widgets like a container which we will select as a stateless widget and it’s child also a container but we will take as a stateful widget and when you would rebuild then the state will only affect stateful container so it does not matter if the parent widget is stateful or not if the child is a stateful widget.

Actually you can say

#flutter #statefulwidget #cross-platform #flutter-widget #stateless

Stateful & Stateless: A Doubt Clearing Session
1.25 GEEK