diff --git a/lib/store/shopping/shopping_cart/shopping_cart_page.dart b/lib/store/shopping/shopping_cart/shopping_cart_page.dart index a50dda53..1fe50aef 100644 --- a/lib/store/shopping/shopping_cart/shopping_cart_page.dart +++ b/lib/store/shopping/shopping_cart/shopping_cart_page.dart @@ -43,6 +43,7 @@ class _ShoppingCartPage extends State int tableId = 0; bool topIndex = false; bool isAllSelect = false; + int bIndex = 0; @override void initState() { @@ -150,8 +151,9 @@ class _ShoppingCartPage extends State }); }, child: Container( - alignment: Alignment.center, + alignment: Alignment.centerRight, margin: EdgeInsets.only(right: 12.w), + padding: EdgeInsets.only(left:35,), child: Text( !topIndex ? "管理" : S.of(context).quxiao, style: TextStyle( @@ -230,13 +232,15 @@ class _ShoppingCartPage extends State }); }); }, - child: Image.asset( - isAllSelect + child: Container( + height:70, + child: Image.asset( + (isAllSelect) ? "assets/image/icon_radio_selected.webp" : "assets/image/icon_radio_unselected.webp", width: 16, height: 16, - ), + ),), ), SizedBox(width: 5.w), Expanded( @@ -319,7 +323,7 @@ class _ShoppingCartPage extends State height: 32.h, margin: EdgeInsets.only(left: 6.w), decoration: BoxDecoration( - color: Color(0xFFFB312B), + color: (isAllSelect || (shopCarGoods[0].shoppingCartSkuItemList[bIndex].selected == 1)) ? Color(0xFFFB312B) :Color(0xFFE5E5E5), borderRadius: BorderRadius.circular(16), boxShadow: [ BoxShadow( @@ -371,7 +375,9 @@ class _ShoppingCartPage extends State physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( - onTap: () {}, + onTap: () { + bIndex = position; + }, child: cartGoodsItem(position), ); }), @@ -410,13 +416,15 @@ class _ShoppingCartPage extends State shopCarGoods[0].shoppingCartSkuItemList[index].selected); }); }, - child: Image.asset( + child:Container( + height: 60, + child:Image.asset( (shopCarGoods[0].shoppingCartSkuItemList[index].selected == 1) ? "assets/image/icon_radio_selected.webp" : "assets/image/icon_radio_unselected.webp", width: 16, height: 16, - ), + ),), ), SizedBox(width: 16.w), MImage(