stackRouterOfIndex method

StackRouter? stackRouterOfIndex(
  1. int index
)

If page corresponding with index has an attached StackRouter returns it otherwise returns null

Implementation

StackRouter? stackRouterOfIndex(int index) {
  if (_childControllers.isEmpty) {
    return null;
  }
  final matchId = _pages[index].routeData.matchId;
  final innerRouter = _innerControllerOfMatch(matchId);
  if (innerRouter is StackRouter) {
    return innerRouter;
  } else {
    return null;
  }
}