anchor.diff:              ListTile(
                 title: Text(book.title),
                 subtitle: Text(book.author),
  -              onTap: () => onTapped(book),
  +              onTap: () => onTapped(books.indexOf(book)),
               )
           ],
         ),
  
positive.code: 
    @override
    BookRoutePath get currentConfiguration {
      final selectedBook = _appState.selectedBook;
      if (selectedBook == null) {
        return BookRoutePath.home();
      } else {
        return BookRoutePath.details(_appState.getId(selectedBook));
      }
    }
  
  
negative.code: }
  
  class AppState extends ChangeNotifier {
    int? _selectedBookId;
  
    int? get selectedBookId => _selectedBookId;
  
    set selectedBookId(int? id) {
      _selectedBookId = id;
      notifyListeners();
    }
  
    Book? get selectedBook {
      var idx = _selectedBookId;
      if (idx == null) {
        return null;
      }
      return books[idx];
    }
  
    set selectedBook(Book? book) {
      if (book == null) {
        _selectedBookId = null;
        notifyListeners();
        return;
      }
  
      var id = books.indexOf(book);
      if (id == -1) {
        _selectedBookId = null;
      } else {
        _selectedBookId = id;
      }
  
      notifyListeners();
    }
  
    void clearSelectedBook() {
      _selectedBookId = null;
      notifyListeners();
    }
  }
  
  