currentNavigatorKey property

GlobalKey<NavigatorState> get currentNavigatorKey

The key of the Navigator currently on stage.

For single-stack controllers this is navigatorKey. For tabbed controllers it is the active branch's key — navigatorKey is unused in tabbed mode (each branch owns its own Navigator). Read this instead of navigatorKey when you need the live NavigatorState for programmatic push/pop or route inspection.

Implementation

GlobalKey<NavigatorState> get currentNavigatorKey => _controller.isTabbed
    ? _branchKey(_controller.activeBranchId)
    : navigatorKey;