If you are in doubt, then always remember this rule: if a widget changes
(because of user interactions, for example) it’s stateful.
However, if a widget reacts to change, the containing parent widget can
still be stateless if it doesn’t itself react to change.

The following example shows how to use a StatelessWidget. A common
StatelessWidget is the Text widget. If you look at the implementation of
the Text widget you’ll find that it subclasses StatelessWidget.

As you can see, the Text Widget has no state information associated with it,
it renders what is passed in its constructors and nothing more.

But, what if you want to make “I Like Flutter” change dynamically, for
example when clicking a FloatingActionButton?

To achieve this, wrap the Text widget in a StatefulWidget and
update it when the user clicks the button.

For example:

How do I lay out my widgets? Where is my XML layout file?