currentContext property

BuildContext? get currentContext

The BuildContext of the Widget in the tree that has this Ref.

Implementation

BuildContext? get currentContext => _currentNode?.context;