stackRouterOfIndex method
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 routeKey = _pages[index].routeData.key;
final innerRouter = _innerControllerOf(routeKey);
if (innerRouter is StackRouter) {
return innerRouter;
} else {
return null;
}
}