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

If you look at the code above, you might notice that the Text widget
carries no explicit state 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:

Widget layout

In UIKit, you might use a Storyboard file
to organize your views and set constraints,
or you might set your constraints programmatically in your view controllers.
In Flutter, declare your layout in code by composing a widget tree.

The following example shows how to display a simple widget with padding: