anchor.diff:  
   class AppState extends ChangeNotifier {
     final Authentication auth;
  +  bool _isViewingBooks = false;
  +  bool _isViewingSignIn = false;
   
     AppState(this.auth);
   
     Future<bool> signIn(String username, String password) async {
       var success = await auth.signIn(username, password);
  +    if (success) {
  +      _isViewingSignIn = false;
  +    }
       notifyListeners();
       return success;
     }
   
  -  bool _viewingBooks = false;
  -
  -  bool get viewingBooks => _viewingBooks;
  -
  -  set viewingBooks(bool value) {
  -    _viewingBooks = value;
  +  Future<void> signOut() async {
  +    await auth.signOut();
  +    _isViewingSignIn = true;
       notifyListeners();
     }
  +
  +  bool get isViewingBooks => _isViewingBooks;
  +
  +  set isViewingBooks(bool value) {
  +    _isViewingBooks = value;
  +    if (_isViewingBooks) {
  +      _isViewingSignIn = false;
  +    }
  +
  +    notifyListeners();
  +  }
  +
  +  bool get isViewingSignIn => _isViewingSignIn;
  +
  +  set isViewingSignIn(bool value) {
  +    _isViewingSignIn = value;
  +    if (_isViewingSignIn) {
  +      _isViewingBooks = false;
  +    }
  +
  +    notifyListeners();
  +  }
   }
   
   class _BooksAppState extends State<BooksApp> {
  -  final BookRouterDelegate _routerDelegate = BookRouterDelegate();
  -  final BookRouteInformationParser _routeInformationParser =
  -  BookRouteInformationParser();
  +  final AppState _appState = AppState(MockAuthentication());
  +  late final BookRouterDelegate _routerDelegate = BookRouterDelegate(_appState);
  +  late final BookRouteInformationParser _routeInformationParser =
  +  BookRouteInformationParser(_appState);
   
     @override
     void dispose() {
  
positive.code:               key: ValueKey('BooksListPage'),
                child: BooksListScreen(),
              ),
          ] else
            MaterialPage(
              key: ValueKey('SignInScreen'),
              child: SignInScreen(
                onSignedIn: _handleSignedIn,
              ),
            )
        ],
        onPopPage: (route, result) {
          if (!route.didPop(result)) {
            return false;
          }
  
          if (_appState.viewingBooks) {
            _appState.viewingBooks = false;
          }
  
          return true;
        },
      );
    }
  
    @override
    Future<void> setNewRoutePath(AppRoutePath path) async {
      if (path is HomeRoutePath) {
        _appState.viewingBooks = false;
      } else if (path is BooksRoutePath) {
        _appState.viewingBooks = true;
      } else if (path is SignInRoutePath) {
        // Sign out
        _appState.viewingBooks = false;
        _appState.auth.signOut();
      }
    }
  
    void _handleGoToBooks() {
      _appState.viewingBooks = true;
    }
  
    Future _handleSignedIn(Credentials credentials) async {
      await _appState.signIn(credentials.username, credentials.password);
    }
  }
  
  class AppRoutePath {}
  
negative.code:   }
  
    @override
    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 (viewingSignIn)
            MaterialPage(
              key: ValueKey('SignInScreen'),
              child: SignInScreen(
                onSignedIn: _handleSignedIn,
              ),
            )
          else ...[
            MaterialPage(
              key: ValueKey('HomeScreen'),
              child: HomeScreen(
                onGoToBooks: _handleGoToBooks,
                onSignOut: _handleSignOut,
              ),
            ),
            if (viewingBooksScreen)
  