currentComponent property

Component? currentComponent

The component in the tree that currently has this global key.

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

Implementation

Component? get currentComponent => _currentElement?.component;