context property

BuildContext context
inherited

The location in the tree where this widget builds.

The framework associates State objects with a BuildContext after creating them with StatefulWidget.createState and before calling initState. The association is permanent: the State object will never change its BuildContext. However, the BuildContext itself can be moved around the tree.

After calling dispose, the framework severs the State object's connection with the BuildContext.

Implementation

BuildContext get context => _element;