currentContext property

BuildContext currentContext

The build context in which the widget with this key builds.

The current context is null if there is no widget in the tree that matches this global key.

Implementation

BuildContext get currentContext => _currentElement;