clearState method

void clearState({
  1. bool includeCurrent = true,
})

Clears all known routes from memory

Implementation

void clearState({bool includeCurrent = true}) {
  Widget? currentRoute = _knownRoutes[_matchedRoutePaths];
  _knownRoutes.clear();
  if (currentRoute != null) {
    _knownRoutes[_matchedRoutePaths!] = currentRoute;
  }
}