navigatorKey property

GlobalKey<NavigatorState> navigatorKey
override

The key used for retrieving the current navigator.

When using this mixin, be sure to use this key to create the navigator.

Implementation

GlobalKey<NavigatorState> get navigatorKey {
  var pos = routePath.pageInstances.last.position;
  if (pos == SplitRouterPosition.Dialog) {
    return navigatorKeyDialog;
  } else if (useOnlySingleNavigator) {
    return navigatorKeyLeft;
  } else {
    return pos == SplitRouterPosition.Left
        ? navigatorKeyLeft
        : navigatorKeyRight;
  }
}