Types of Widgets in Flutter

Learn what widgets are, their different types, and how you can create your custom widget.

Types of widgets

There are two types of widgets in Flutter, stateful and stateless. However, we can broadly categorize them into two more types – visible and invisible.

Before we discuss inherited widgets, let us briefly look at the inside world of widgets.

What are visible widgets?

Visible widgets are ones that we can see, the widgets that take inputs and give outputs.

ElevatedButton() and Text(), etc…

However, invisible widgets also play crucial roles because they control the look and structure of the Flutter app.

Row(), Column(), ListView(), etc…

The Container() widget may belong to both categories. Because we can decorate the container by changing its color or shape. We can also make it invisible by only placing other visible widgets inside it.

The Container() widget lets us create a rectangular visual element.

We will see examples of such widgets in a minute.

What are widgets in Flutter?

Get hands-on with 1200+ tech skills courses.