- protected
Describes the part of the user interface represented by this widget.
The framework calls this method in a number of different situations:
- After calling initState.
- After calling didUpdateConfig.
- After receiving a call to setState.
- After a dependency of this State object changes (e.g., an
InheritedWidget referenced by the previous
build
changes). - After calling deactivate and then reinserting the State object into the tree at another location.
The framework replaces the subtree below this widget with the widget returned by this method, either by updating the existing subtree or by removing the subtree and inflating a new subtree, depending on whether the widget returned by this method can update the root of the existing subtree, as determined by calling Widget.canUpdate.
Typically implementations return a newly created constellation of widgets that are configured with information from this widget's constructor, the given BuildContext, and the internal state of this State object.
The given BuildContext contains information about the location in the
tree at which this widget is being built. For example, the context
provides the set of inherited widgets for this location in the tree. The
BuildContext argument is always the same as the context
property of
this State object and will remain the same for the lifetime of this
object. The BuildContext argument is provided redundantly here so that
this method matches the signature for a WidgetBuilder.
Source
@protected Widget build(BuildContext context);