to method

Future<void> to(
  1. String route, [
  2. int? index,
  3. String pageKey = 'ipage'
])

Implementation

Future<void> to(String route, [int? index, String pageKey = 'ipage']) async {
  int tabno = 0;
  if (index != null) tabno = index;
  String url = route;
  if (tabno != parser.currentTab) parser.currentTab = tabno;
  if (tabno != 0) url += ':$pageKey=$tabno';

  // if (url != parser.histories[parser.currentTab].last)
  //   parser.histories[parser.currentTab].add(url); //url加入到当前页面的历史
  //debugPrint('to:url=$url');
  this.route =
      await parser.parseRouteInformation(RouteInformation(location: url));
}