Flutter Widgets

Whenever you are going to code anything in Flutter it's going to be inside the widgets. The central purpose is to build an app out of widgets. These widgets are nested with each other to build an app. It means that the root of your app itself is a widget and all the way down is a widget also. We can split Flutter widgets into two categories 1. Visible Widgets and 2nd Invisible Widgets. The Visible Widgets are related to user input and output data. Some of the important types of widgets are 1.Text: A Text width holds some text to be displayed on the screen and by using different style properties we can style these widgets 2.Button: This widget allows you to perform some actions on click. Flutter does not allow you to use the button widget directly instead it uses buttons like Flat button and Raisedbutton , note that the onPressed property allows us to perform the action when you click that button and the elevation property is used to change how much it stands out. 3: Icon: This widget acts like a container for storing icons in Flutter. These were among the few examples of visible widgets.

The invisible widgets are related to the layout and control of widgets. It provides control over how the widgets will actually behave and look on the screen one example of these invisible widgets is the: Column: It's a type of widget that arranges all its children in a vertical alignment. It provides spacing between the widgets by using mainaxisalignmnet and crossaxisallignment. 2nd Row Widget: The row widget is similar to column but it constructs a widget horizontally rather than vertically.Here the main axis is the horizontal axis and the cross axis is the vertical axis.

Did you find this article valuable?

Support Siddhi Jadhav by becoming a sponsor. Any amount is appreciated!