w-R 3 years ago
parent
commit
b22fa5d615
  1. 22
      lib/store/shopping/shopping_cart/shopping_cart_page.dart

22
lib/store/shopping/shopping_cart/shopping_cart_page.dart

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

Loading…
Cancel
Save