|
|
@ -34,8 +34,8 @@ class ProductSku extends StatefulWidget { |
|
|
|
|
|
|
|
|
|
|
|
class _ProductSku extends State<ProductSku> { |
|
|
|
class _ProductSku extends State<ProductSku> { |
|
|
|
List<String> selectSkus = []; |
|
|
|
List<String> selectSkus = []; |
|
|
|
|
|
|
|
|
|
|
|
int count = 1; |
|
|
|
int count = 1; |
|
|
|
|
|
|
|
String selectedPrice = ""; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void initState() { |
|
|
|
void initState() { |
|
|
@ -59,6 +59,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (productSku == null) return; |
|
|
|
if (productSku == null) return; |
|
|
|
|
|
|
|
selectedPrice = productSku.skuPrice; |
|
|
|
String skuId = productSku.id; |
|
|
|
String skuId = productSku.id; |
|
|
|
if (widget.shopCarGoods == null || widget.shopCarGoods.shoppingCartSkuItemList == null) return; |
|
|
|
if (widget.shopCarGoods == null || widget.shopCarGoods.shoppingCartSkuItemList == null) return; |
|
|
|
int shopSkuIndex = widget.shopCarGoods.shoppingCartSkuItemList.indexWhere((element) => skuId == element.id); |
|
|
|
int shopSkuIndex = widget.shopCarGoods.shoppingCartSkuItemList.indexWhere((element) => skuId == element.id); |
|
|
@ -98,6 +99,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
height: MediaQuery.of(context).size.height / 3 * 2, |
|
|
|
height: MediaQuery.of(context).size.height / 3 * 2, |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
// color: Color(0xFFFAFAFA), |
|
|
|
color: Color(0xFFFAFAFA), |
|
|
|
color: Color(0xFFFAFAFA), |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
topLeft: Radius.circular(8), |
|
|
|
topLeft: Radius.circular(8), |
|
|
@ -123,7 +125,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
width: 10, |
|
|
|
width: 10, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded(child: Column( |
|
|
|
Expanded(child:Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
Text( |
|
|
@ -159,7 +161,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
widget.miNiDetail.price, |
|
|
|
selectedPrice, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Color(0xFFFF7A1A), |
|
|
|
color: Color(0xFFFF7A1A), |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
@ -169,9 +171,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
)) |
|
|
|
)), |
|
|
|
, |
|
|
|
|
|
|
|
Spacer(), |
|
|
|
|
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
// Navigator.of(context).pop(); |
|
|
|
// Navigator.of(context).pop(); |
|
|
@ -352,12 +352,12 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
Widget sweetnessItem(String name, bool isCheck) { |
|
|
|
Widget sweetnessItem(String name, bool isCheck) { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
child: Row( |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
width: 70.w, |
|
|
|
width: 70.w, |
|
|
|
height: 29.h, |
|
|
|
height:30.h, |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: !isCheck ? Color(0xFFE5E5E5) : Color(0xFF32A060), |
|
|
|
color: !isCheck ? Color(0xFFE5E5E5) : Color(0xFF32A060), |
|
|
|