resetForTesting method

  1. @visibleForTesting
void resetForTesting()

重置页面栈,仅供测试使用。

Implementation

@visibleForTesting
void resetForTesting() {
  _pages.clear();
  _result.clear();
  _pendingPopResults.clear();
  _location = null;

  final rootPage = pageMap['/'];
  if (rootPage != null) {
    _pages.add(_createPageEntry(page: rootPage, name: '/'));
    _location = '/';
  }
  notify();
}