Posts

Showing posts with the label State full

Understanding the widget tree and element tree

Image
Understanding the Widget tree and Element tree: Widget tree : Widget tree are the collection of different widgets that are use to build the application. Widget contain the instructions to create the UI and when you compose widgets  together they create widget tree. In flutter every thing is widgets mans that when the application is run it call the runApp() method .Basically we taking StatelessWidget as the argument and mounted as root element for the application.Then flutter framework processes through all the widgets and corresponding elements is mounted. void   main () =>  runApp ( MyApp ()); class   MyApp   extends   StatelessWidget  {    // This widget is the root of your application.    @override    Widget   build ( BuildContext  context) {      return   MaterialApp ( debugShowCheckedModeBanner:  false ,...

Types of widgets and there Life Cycle

Image
Types of widgets and there Life Cycle: Mainly two type of widgets in flutter using these widgets we can create stunning app. The widgets are as follow: Stateless widgets. State full widgets. Stateless widgets: Stateless widget are the widgets that do not chance there state like text, image,etc. A State less widgets are use when the value not change. For example, the screen displays an image with a description and will not change . The Basic Structure of Stateless widget is as follow: class JournalList extends StatelessWidget {   @override   Widget build(BuildContext context) {     return Container( );   }  }  State Full Widget: State full widgets is used when Values have to change means it change the State when the certain event is occurred or data receive.The State full widget are dynamic,    Checkbox ,  Radio ,  Slider ,  InkWell ,  Form , and...