navigateTo method

void navigateTo(
  1. String view, {
  2. String? breadcrumb,
})

Implementation

void navigateTo(String view, {String? breadcrumb}) {
  // Trim forward history if we navigated back
  if (_historyIndex < history.length - 1) {
    history.removeRange(_historyIndex + 1, history.length);
  }
  currentView = view;
  history.add(view);
  _historyIndex = history.length - 1;
  if (breadcrumb != null) {
    breadcrumbs.add(breadcrumb);
  }
}