Widgets
Widgets are the primary component of any flutter application. It acts as a UI for the user to interact with the application. Any flutter application is itself a widget that is made up of a combination of widgets. In a standard application, the root defines the structure of the application followed by a Material App widget which basically holds its internal components in place. This is where the properties of the UI and the application itself is set. The Material App has a Scaffold widget that consists of the visible components (widgets) of the application. The Scaffold has two primary properties namely the body and appbar. It holds all the child widgets and this is where all its properties are defined. The below diagram shows the hierarchy of a flutter application:.
Inside Scaffold, there is usually an appbar widget, which as the name suggests define appbar of the application. The scaffold also has a body where all the component widgets are placed. This is where these widget’s properties are set. All these widgets combined form the Homepage of the application itself. The Center widget has a property, Child, which refers to the actual content and it is built using the Text widget.
Flutter – Architecture Application
Flutter architecture application mainly consists of:
- Widgets
- Gestures
- Concept of State
- Layers