In Flutter, everything is considered a widget, but what is a widget, and what is its purpose? Flutter’s documentation states: “widgets describe what their view should look like given their current configuration and state.”
In other words, a widget is a thing that describes how something looks at a point in time. And what it looks like depends on what properties or attributes you use and whether or not it needs to be updated (its state). In Flutter, widgets are the central building blocks for designing mobile apps, each available for specific purposes. For example, if we want to add styled text, we must use the Text widget or a Row widget to display things horizontally.
Flutter offers a variety of widgets for different use cases and can be combined with others to design and build a fully functioning app. Think of them like a Lego block; each has a distinct purpose and can be combined with others to construct a complete mobile app.