What is a Widget in Flutter?
Everything in Flutter is a widget — text, button, padding, layout, etc.
Widgets are building blocks of the Flutter UI.
Types of Widgets:
-
StatelessWidget:
-
Immutable — once built, it doesn’t change.
-
Example:
Text,Icon,RaisedButton.
-
-
StatefulWidget:
-
Mutable — can change during runtime.
-
Example:
Checkbox,TextField,Slider.
-
Comments
Post a Comment