fix: some error managment and a whole feature missing

This commit is contained in:
Alzalia 2025-08-23 15:52:51 +02:00
parent dad000a1b9
commit 6bcc3a7e88
5 changed files with 192 additions and 140 deletions

View file

@ -125,8 +125,7 @@ class AddViewModel extends ChangeNotifier {
*/
/// Retrieves the book associated with an ean through a [barcode]
Future<Result<Book>> scanBook(BarcodeCapture barcode) async {
var ean = barcode.barcodes.first.rawValue!;
Future<Result<Book>> scanBook(String ean) async {
var result = await _bookRepository.getBookByEAN(ean);
return result;
}