From 6439fe264abb377ea105536e4b251518c9393f5e Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Sun, 21 Nov 2021 10:44:46 +0200 Subject: [PATCH] small fix in order details --- lib/pages/pharmacies/widgets/ProductOrderItem.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pages/pharmacies/widgets/ProductOrderItem.dart b/lib/pages/pharmacies/widgets/ProductOrderItem.dart index a49c1273..429ee92b 100644 --- a/lib/pages/pharmacies/widgets/ProductOrderItem.dart +++ b/lib/pages/pharmacies/widgets/ProductOrderItem.dart @@ -249,11 +249,11 @@ class _ProductOrderItemState extends State { } else { newValue = widget.item.quantity - 1; } - } else { - _quantityController.text = "${widget.item.quantity}"; - _totalPrice = - "${(widget.item.product.price * widget.item.quantity).toStringAsFixed(2)}"; + widget.item.quantity = newValue; } + _quantityController.text = "${widget.item.quantity}"; + _totalPrice = + "${(widget.item.product.price * widget.item.quantity).toStringAsFixed(2)}"; } }); }