anchor.diff:  
   class BooksListScreen extends StatelessWidget {
     final List<Book> books;
  -  final ValueChanged<Book> onTapped;
  +  final ValueChanged<int> onTapped;
   
     BooksListScreen({
       required this.books,
  
positive.code: }
  
  class AppState extends ChangeNotifier {
    Book? _selectedBook;
  
    Book? get selectedBook => _selectedBook;
  
    set selectedBook(Book? book) {
      _selectedBook = book;
      notifyListeners();
    }
  
    int getId(Book book) {
      return books.indexOf(book);
    }
  
    bool setSelected(int? id) {
      if (id == null || id < 0 || id > books.length - 1) {
        return false;
      }
  
      selectedBook = books[id];
      return true;
    }
  
    void clearSelectedBook() {
      selectedBook = null;
    }
  }
  
  
negative.code:   Future<void> setNewRoutePath(BookRoutePath path) async {
      if (path.isDetailsPage) {
        final id = path.id;
        _appState.selectedBookId = id;
      } else {
        _appState.clearSelectedBook();
      }
    }
  
    void _handleBookTapped(int bookId) {
      _appState.selectedBookId = bookId;
    }
  }
  
  