diff --git a/packages/smooth_app/lib/data_models/continuous_scan_model.dart b/packages/smooth_app/lib/data_models/continuous_scan_model.dart index 9ea2ba8db4e..1cafe5a37fd 100644 --- a/packages/smooth_app/lib/data_models/continuous_scan_model.dart +++ b/packages/smooth_app/lib/data_models/continuous_scan_model.dart @@ -239,6 +239,7 @@ class ContinuousScanModel with ChangeNotifier { _latestFoundBarcode = product.barcode; _daoProductList.push(productList, _latestFoundBarcode!); _daoProductList.push(_history, _latestFoundBarcode!); + _daoProductList.localDatabase.notifyListeners(); } _setBarcodeState(product.barcode!, state); } diff --git a/packages/smooth_app/lib/database/dao_product_list.dart b/packages/smooth_app/lib/database/dao_product_list.dart index a7fbec0448b..12a9c7d766f 100644 --- a/packages/smooth_app/lib/database/dao_product_list.dart +++ b/packages/smooth_app/lib/database/dao_product_list.dart @@ -183,7 +183,10 @@ class DaoProductList extends AbstractDao { /// One barcode duplicate is potentially removed: /// * If the barcode was already there, it's moved to the end of the list. /// * If the barcode wasn't there, it's added to the end of the list. - void push(final ProductList productList, final String barcode) { + void push( + final ProductList productList, + final String barcode, + ) { final _BarcodeList? list = _get(productList); final List barcodes; if (list == null) {