From 286583aa5e8b22f138796b969e85472f68a3957e Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Thu, 15 Aug 2024 15:42:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3bug=E6=9B=B4=E6=94=B9=EF=BC=9B=20=E9=80=89?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E5=BC=B9=E7=AA=97=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B=20=E5=8A=A0=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=BC=98=E5=8C=96=EF=BC=9B=20=E6=B8=85?= =?UTF-8?q?=E7=A9=BA=E8=B4=AD=E7=89=A9=E8=BD=A6=E4=BA=A4=E4=BA=92=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/store/store_view/product_sku.dart | 17 +++++++++-------- lib/store/store_view/shop_car.dart | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) 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<ProductSku> { 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<ProductSku> { 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<ShopCar> { ), ), 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",