Read More

What are Widgets in Flutter?

Widgets are simple UI building blocks in Flutter. The views in flutter are totally based on Widgets. They describe how the view should look and function according to there states. As the state of the widget changes, it rebuilds the whole render tree again.

Types of Widgets

So, while working on your view, You create mainly two types of layouts. One which stays the same and does not change and the other one which can be changed according to user interactions. Flutter provides two types of widgets for these two types of views.

  1. StatelessWidgets
  2. StatefullWidgets

StatelessWidgets

There are some views in your application that does not change just like a title bar, you don’t want anyone to change it. These type of static views are build using StatelessWidgets in Flutter. As they do not change after the create there are no states in these widgets.

StatefullWidgets

On the other hand, there are views that change according to user interaction just like Checkbox or a RadioButton. These are used to create dynamic views. They can be changed even after the create so they have states in them.

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close