navigateTo method

bool navigateTo(
  1. String route, [
  2. Map<String, String>? parameters
])

Changes the current selected route, with parameters, of this UINavigableComponent.

Implementation

bool navigateTo(String route, [Map<String, String>? parameters]) {
  if (!canNavigateTo(route)) return false;

  parameters ??= {};

  if (_currentRoute == route &&
      isEquivalentMap(_currentRouteParameters, parameters)) {
    return true;
  }

  _currentRoute = route;
  _currentRouteParameters = copyMapString(parameters);

  componentInternals.refreshInternal();
  return true;
}