anchor.diff:    }
   
     @override
  -  Widget build(BuildContext context) {
  -    final isSignedIn = _appState.auth.isSignedIn();
  -    final viewingBooksScreen = _appState.viewingBooks;
  +  Future<void> setNewRoutePath(AppRoutePath path) async {
  +    if (path is HomeRoutePath) {
  +      _appState.isViewingBooks = false;
  +      _appState.isViewingSignIn = false;
  +    } else if (path is BooksRoutePath) {
  +      _appState.isViewingBooks = true;
  +      _appState.isViewingSignIn = false;
  +    } else if (path is SignInRoutePath) {
  +      _appState.isViewingSignIn = true;
  +      _appState.isViewingBooks = false;
  +    }
  +  }
  +
  +  @override
  +  Widget build(BuildContext context) {
  +    final viewingSignIn = _appState.isViewingSignIn;
  +    final viewingBooksScreen = _appState.isViewingBooks;
       return Navigator(
         key: navigatorKey,
         pages: [
  -        if (isSignedIn) ...[
  +        if (viewingSignIn)
  +          MaterialPage(
  +            key: ValueKey('SignInScreen'),
  +            child: SignInScreen(
  +              onSignedIn: _handleSignedIn,
  +            ),
  +          )
  +        else ...[
             MaterialPage(
               key: ValueKey('HomeScreen'),
               child: HomeScreen(
                 onGoToBooks: _handleGoToBooks,
  +              onSignOut: _handleSignOut,
               ),
             ),
             if (viewingBooksScreen)
  
positive.code: }
  
  class BookRouteInformationParser extends RouteInformationParser<AppRoutePath> {
    @override
    Future<AppRoutePath> parseRouteInformation(
        RouteInformation routeInformation) async {
      final uri = Uri.parse(routeInformation.location!);
  
      // Handle '/'
      if (uri.pathSegments.isEmpty) {
        return HomeRoutePath();
      }
  
      if (uri.pathSegments.length == 1) {
        // Handle '/signin'
        if (uri.pathSegments[0] == 'signin') return SignInRoutePath();
        if (uri.pathSegments[0] == 'books') return BooksRoutePath();
      }
  
      // Handle unknown routes
  
negative.code:     return Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Column(
            children: [
              ElevatedButton(
                onPressed: onGoToBooks,
                child: Text('View my bookshelf'),
              ),
              ElevatedButton(
                onPressed: onSignOut,
                child: Text('Sign out'),
              ),
            ],
          ),
        ),
      );
  