|
|
@ -1,9 +1,7 @@ |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart'; |
|
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/miNiDetail.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/miNiDetail.dart'; |
|
|
|
import 'package:huixiang/store/store_view/store_order_list.dart'; |
|
|
|
|
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
@ -52,7 +50,9 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
errorSrc: "assets/image/default_1.png", |
|
|
|
errorSrc: "assets/image/default_1.png", |
|
|
|
fadeSrc: "assets/image/default_1.png", |
|
|
|
fadeSrc: "assets/image/default_1.png", |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(width: 10), |
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10, |
|
|
|
|
|
|
|
), |
|
|
|
Column( |
|
|
|
Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
@ -92,7 +92,7 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
@ -114,32 +114,33 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
height: 23, |
|
|
|
height: 23, |
|
|
|
), |
|
|
|
), |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
child: ListView.builder( |
|
|
|
child: ListView.builder( |
|
|
|
itemCount: widget.miNiDetail.attrList.length, |
|
|
|
itemCount: widget.miNiDetail.attrList.length, |
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
itemBuilder: (context, position) { |
|
|
|
itemBuilder: (context, position) { |
|
|
|
return attrItem( |
|
|
|
return attrItem( |
|
|
|
() { |
|
|
|
() { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
|
for (var i = 0; |
|
|
|
for (var i = 0; |
|
|
|
i < |
|
|
|
i < |
|
|
|
widget.miNiDetail.attrList[position].attrValueList |
|
|
|
widget.miNiDetail.attrList[position].attrValueList |
|
|
|
.length; |
|
|
|
.length; |
|
|
|
i++) { |
|
|
|
i++) { |
|
|
|
if (tempClickIndex == i) |
|
|
|
if (tempClickIndex == i) |
|
|
|
widget.miNiDetail.attrList[position].attrValueList[i] |
|
|
|
widget.miNiDetail.attrList[position].attrValueList[i] |
|
|
|
.isSelected = true; |
|
|
|
.isSelected = true; |
|
|
|
else |
|
|
|
else |
|
|
|
widget.miNiDetail.attrList[position].attrValueList[i] |
|
|
|
widget.miNiDetail.attrList[position].attrValueList[i] |
|
|
|
.isSelected = false; |
|
|
|
.isSelected = false; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
widget.miNiDetail.attrList[position], |
|
|
|
widget.miNiDetail.attrList[position], |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
)), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
), |
|
|
|
), |
|
|
@ -147,14 +148,15 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"数量", |
|
|
|
"数量", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Colors.black, |
|
|
|
color: Colors.black, |
|
|
|
fontSize: 14.sp, |
|
|
|
fontSize: 14.sp, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
), |
|
|
|
InkWell( |
|
|
|
InkWell( |
|
|
|
onTap: () {}, |
|
|
|
onTap: () {}, |
|
|
|
child: Image.asset( |
|
|
|
child: Image.asset( |
|
|
@ -187,19 +189,17 @@ class _ProductSku extends State<ProductSku> { |
|
|
|
SizedBox( |
|
|
|
SizedBox( |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
), |
|
|
|
), |
|
|
|
GestureDetector( |
|
|
|
RoundButton( |
|
|
|
onTap: () {}, |
|
|
|
width: double.infinity, |
|
|
|
child: RoundButton( |
|
|
|
height: 54.h, |
|
|
|
width: double.infinity, |
|
|
|
text: "加入购物车", |
|
|
|
height: 54.h, |
|
|
|
textColor: Colors.white, |
|
|
|
text: "加入购物车", |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
textColor: Colors.white, |
|
|
|
radius: 27, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
radius: 27, |
|
|
|
fontSize: 16.sp, |
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
// padding: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
fontSize: 16.sp, |
|
|
|
callback: () { }, |
|
|
|
// padding: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|