What is the Widget Tree?
Every Flutter app is a tree of widgets.
Each widget nests inside another to create the complete UI structure.
Example:
Here, the tree looks like:
MaterialApp → Scaffold → AppBar → Text / Center → Text
Every Flutter app is a tree of widgets.
Each widget nests inside another to create the complete UI structure.
Example:
MaterialApp( home: Scaffold( appBar: AppBar(title: Text("Hello")), body: Center(child: Text("Welcome")), ), );
Here, the tree looks like:
MaterialApp → Scaffold → AppBar → Text / Center → Text
Comments
Post a Comment