add await for _daoProductList.put

This commit is contained in:
Stéphane Gigandet
2021-03-27 18:09:50 +01:00
parent b5bcd0ec18
commit 6f1e505fcf

View File

@ -173,7 +173,7 @@ class ContinuousScanModel with ChangeNotifier {
final ScannedProductState state,
) async {
_productList.refresh(product);
_daoProductList.put(_productList);
await _daoProductList.put(_productList);
setBarcodeState(product.barcode, state);
}
@ -182,7 +182,7 @@ class ContinuousScanModel with ChangeNotifier {
final ScannedProductState state,
) async {
_productList.add(product);
_daoProductList.put(_productList);
await _daoProductList.put(_productList);
setBarcodeState(product.barcode, state);
}
}