From e999d111f8c22ed0cafac9fb7fea98d4761e9212 Mon Sep 17 00:00:00 2001 From: fmk Date: Tue, 12 Oct 2021 15:36:47 +0800 Subject: [PATCH] safety --- lib/store/store_view/product_sku.dart | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index be084206..9608d09f 100644 --- a/lib/store/store_view/product_sku.dart +++ b/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 { 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 { fontSize: 14.sp, fontWeight: MyFontWeight.medium, ), - ) + ), ], ), ], @@ -114,32 +114,33 @@ class _ProductSku extends State { 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 { 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 { 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: () { }, ), ], ),