VOOZH about

URL: https://www.geeksforgeeks.org/flutter/what-is-widgets-in-flutter/

⇱ Widgets in Flutter - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Widgets in Flutter

Last Updated : 27 May, 2026

Widgets are the basic building blocks of a Flutter application. Every element visible on the screen such as text, buttons, images, layouts, and animations is created using widgets. Flutter applications are built by combining multiple widgets together in a tree-like structure called the Widget Tree.

  • Widgets define the structure and appearance of the user interface.
  • Flutter provides both Material Design and Cupertino widgets.
  • Widgets can be reused to build responsive and interactive applications.

Category of Widgets

There are mainly 14 categories into which the flutter widgets are divided. They are mainly segregated on the basis of the functionality they provide in a flutter application.

Design systems

Widgets

Description

Cupertino

These are the iOS-designed widgets.

Material Components

This is a set of widgets that mainly follow the material design by Google.


Base widgets

Widgets

Description

Accessibility

These are the set of widgets that make a Flutter app more easily accessible.

Animation and Motion

These widgets add animation to other widgets.

Assets, Images, and Icons

These widgets take charge of assets such as display images and show icons.

Async

These provide async functionality in the Flutter application.

Basics

These are the bundle of widgets that are necessary for the development of any Flutter application.

Input

This set of widgets provides input functionality in a Flutter application.

Interaction Models

These widgets are here to manage touch events and route users to different views in the application.

Layout

This bundle of widgets helps in placing the other widgets on the screen as needed.

Painting and effects

This is the set of widgets that apply visual changes to their child widgets without changing their layout or shape.

Scrolling

This provides scrollability to a set of other widgets that are not scrollable by default.

Styling

This deals with the theme, responsiveness, and sizing of the app.

Text

This displays text.

Types of Widgets

There are broadly two types of widgets in the flutter: 

1. Stateless Widget

Stateless Widget is a type of widget which once built , then it's properties and state can't be changed. These widgets are immutable, once created can't be modified.

Note: These are used for static content or UI content that don't need a change after time.

Key Characterstics of Stateless Widgets are: , and .

Examples: Display Text, Icons, Images, etc.

Refer to this article to know more about the stateless widget app - A Hello World App using Flutter

2. Stateful Widget

Stateful Widgets is a type of widget that can change state. It can maintain and update the appearance in the response to change in state.

Note: These are used for dynamic change in the properties and appearance over the time.

Key Characterstics of Stateful Widgets are: , and .

Examples: Buttons, Sliders, Text Fields, etc.

Refer to this article to know more about stateful widget app - Retrieve Data From TextFields in Flutter.

Widget Tree Structure in Flutter

The following diagram shows the basic widget tree structure of a Flutter application and how widgets are arranged hierarchically on the screen.

👁 Layout_Tree

Descriptions of the widgets used are as follows: 

  • Scaffold - Implements the basic material design visual layout structure.
  • App-Bar - To create a bar at the top of the screen.
  • Text - To write anything on the screen.
  • Center - To provide center alignment to other widgets.

Example:

Output:

👁 Image



Example: 

The Layout Tree of basic app screen using Stateful Widgets. This is a simple counter app , which can increase the number in the center when the user taps on the button.


Output:


Comment
Article Tags:

Explore