currentContext property
BuildContext?
currentContext
The build context in which the component with this key builds.
The current context is null if there is no component in the tree that matches this global key.
Implementation
BuildContext? get currentContext => _currentElement;