Browse Source

safety

master
fmk 3 years ago
parent
commit
e999d111f8
  1. 100
      lib/store/store_view/product_sku.dart

100
lib/store/store_view/product_sku.dart

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

Loading…
Cancel
Save