diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 3144aee2..ff6cc441 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -86,7 +86,7 @@ class _ProductSku extends State { return PopScope( canPop: true, onPopInvoked: (isPop) { - Navigator.of(context).pop(); + SmartDialog.dismiss(); }, child: StatefulBuilder(builder: (context1, state) { return Container( @@ -317,13 +317,14 @@ class _ProductSku extends State { backgroup: Color(0xFF32A060), fontSize: 16.sp, callback: () { - Navigator.of(context).pop(); - // SmartDialog.dismiss(); - if (!_isTapEd) - widget.addShopCar( - widget.miNiDetail, - selectSkus, - (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) ? 1 : count); + + Navigator.of(context).pop(); + // SmartDialog.dismiss(); + if (!_isTapEd) + widget.addShopCar( + widget.miNiDetail, + selectSkus, + (widget.miNiDetail.subscribeParam?.isEnableSubscribe ?? false) ? 1 : (count >0? count :1)); }, ), if (widget.buttonType == 1) diff --git a/lib/store/store_view/shop_car.dart b/lib/store/store_view/shop_car.dart index 3ae2d065..2427c7d0 100644 --- a/lib/store/store_view/shop_car.dart +++ b/lib/store/store_view/shop_car.dart @@ -77,15 +77,16 @@ class _ShopCar extends State { ), ), InkWell( - onTap: () { + onTap: () async{ // widget.shopingCar?.shoppingCartSkuItemList?.clear(); // state(() {}); // widget.clearShopCar(); if (widget.shopingCar?.shoppingCartSkuItemList != null) { widget.shopingCar?.shoppingCartSkuItemList?.clear(); } + await widget.clearShopCar(); state(() {}); - widget.clearShopCar(); + SmartDialog.dismiss(); }, child: Image.asset( "assets/image/delete.webp",