resolveNavigateViewGroupTabIndex function
Resolves the tab index for NavigateViewGroupAction before
PageController.jumpToPage. Clamps when the menu has items; otherwise
preserves viewIndex (the PageGroup ancestor may not be mounted yet).
Implementation
@visibleForTesting
int resolveNavigateViewGroupTabIndex(int viewIndex, int menuLen) =>
menuLen > 0 ? safeViewGroupPayloadIndex(viewIndex, menuLen) : viewIndex;