route property
ParsedRoute
route
Implementation
ParsedRoute get route => _route;
Implementation
set route(ParsedRoute newRoute) {
//debugPrint('route.path=${_route.path},template=${_route.pattern}');
// Don't notify listeners if the path hasn't changed.
if (_route == newRoute) return; //如果newRute和当前_route相同则不做什么
_route = newRoute;
//如果分页,则修改当前页号
if (parser.useTabs) {
parser.currentTab = getPageId();
}
//如果和倒数第二个路由相同,则表示后退?
// var len = parser.histories[parser.currentTab].length;
// if (len >= 2) {
// if (parser.histories[parser.currentTab][len - 2] == newRoute.path) {
// parser.histories[parser.currentTab].removeLast();
// }
// }
notifyListeners();
}