Future setNewRoutePath()

in nav2-usability/scenario_code/lib/skipping-stacks/router.dart [294:306]


  Future<void> setNewRoutePath(AppRoutePath path) async {
    if (path is AuthorRoutePath) {
      _appState.selectedAuthorId = path.id;
    } else if (path is AuthorsRoutePath) {
      _appState.isViewingAuthorsPage = true;
    } else if (path is BookRoutePath) {
      _appState.selectedBookId = path.id;
    } else {
      _appState.clearSelectedBook();
      _appState.clearSelectedAuthor();
      _appState.isViewingAuthorsPage = false;
    }
  }