findById method

Future<BookData?> findById(
  1. int bookId
)

Implementation

Future<BookData?> findById(int bookId) async {
  return await (db.select(
    db.book,
  )..where((e) => e.id.equals(bookId))).getSingleOrNull();
}