Flutter Build widgets
Flutter does the job of rendering the widgets on the screen for us (more on change detection & rendering later), but it needs configuration information for the widget: what color is it going to be, what is its border, does it contain other widgets....
Build MethodWhen it needs to know how to render a widget, Flutter calls the ‘build’ method in your widget. That method returns a Widget object that gives Flutter configuration information about the widget (and any child
widgets that it may be composed of).
The ‘build’ method takes one argument, the BuildContext (more on that later) and returns a Widget object. That returned Widget object contains configuration data that tells Flutter that it needs to render a Material App widget with a title and some centered text.
Build ContextEarlier we mentioned that a widget can contain other widgets, in a tree structure, a hierarchy. This is often called a Widget Tree. The first argument to the build’ method of your Widget is the BuildContext. This gives your ‘build’ method information about the location of your Widget in the Widget Tree.
It may not seem useful at the moment but will come in very handy later on!