From bfc6c59c527fc9b66e2c6c48e2e5dfedc7bf21f8 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Sat, 20 Jan 2024 15:14:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=95=86=E5=93=81-=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A4=9A=E8=A7=84=E6=A0=BC=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=95=B0=E6=8D=AE=E4=BA=A4=E4=BA=92=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=9B=20=E7=BC=96=E8=BE=91=E5=A4=9A=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=94=B9=EF=BC=9B?= =?UTF-8?q?=20=E8=AE=BE=E7=BD=AE=E5=95=86=E5=93=81=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E4=BC=A0=E5=80=BC=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/add_goods/add_goods_page.dart | 677 ++++++++++-------- .../goods/add_goods/edit_specs_detail.dart | 8 +- .../goods/add_goods/set_goods_specs.dart | 22 +- .../goods/on_sale/batch_shelf.dart | 512 ++++++------- 4 files changed, 649 insertions(+), 570 deletions(-) diff --git a/lib/business_system/goods/add_goods/add_goods_page.dart b/lib/business_system/goods/add_goods/add_goods_page.dart index 1e10fd94..ed35dcfe 100644 --- a/lib/business_system/goods/add_goods/add_goods_page.dart +++ b/lib/business_system/goods/add_goods/add_goods_page.dart @@ -53,6 +53,7 @@ class _AddGoodsPage extends State { bool isKeyBoardShow = false; FocusNode _focusNode = FocusNode(); List mealDetails = []; + List goodsSpecsDetails = []; @override void initState() { @@ -82,14 +83,12 @@ class _AddGoodsPage extends State { } _onRefresh() async { - EasyLoading.show( - status: S.current.zhengzaijiazai, - maskType: EasyLoadingMaskType.black); + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); await queryProductGroupList(); await queryCategorize(); EasyLoading.dismiss(); - if (mounted) - setState(() {}); + if (mounted) setState(() {}); } ///分组列表 @@ -128,7 +127,8 @@ class _AddGoodsPage extends State { tenant: BusinessInstance.instance.businessTenant, storeId: widget.arguments["storeId"]); } - BaseData> baseData = await businessService.findCategoryListByDepth().catchError((error) {}); + BaseData> baseData = + await businessService.findCategoryListByDepth().catchError((error) {}); if (baseData != null && baseData.isSuccess) { goodsCategoryList = baseData.data; } @@ -146,41 +146,53 @@ class _AddGoodsPage extends State { } BaseData baseData = await businessService.productSave({ "storeId": widget.arguments["storeId"], - "attrStyle": isAttrStyle == true ? 0:1,//款式类型:1-多款式 0-单款式 - "categoryId": "1343391656220557312",//分类id - "oversold": isOversold == true ? 1:0,//允许超卖:1-允许 0-不允许 - "setMeal": isSetMeal == true ? 0:1,//套餐专属商品 0是 1不是 - "groupId": "1693436138259218432",//分组id + "attrStyle": isAttrStyle == true ? 0 : 1, //款式类型:1-多款式 0-单款式 + "categoryId": "1343391656220557312", //分类id + "oversold": isOversold == true ? 1 : 0, //允许超卖:1-允许 0-不允许 + "setMeal": isSetMeal == true ? 0 : 1, //套餐专属商品 0是 1不是 + "groupId": "1693436138259218432", //分组id "imgs": [ { - "imgPath": "https://pos.upload.lotus-wallet.com/1195/2023/10/1ba87000-d940-49e5-a6ca-f15623d5f841.jpg" + "imgPath": + "https://pos.upload.lotus-wallet.com/1195/2023/10/1ba87000-d940-49e5-a6ca-f15623d5f841.jpg" } - ],//商品图片 - "needLogistics": isLogistics == true ? 1:0,//需要物流:1-需要 0-不需要 - "productName": "新建商品",//商品名字 - "productType": 0,//商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 - "shortName": "商品简介",//商品简介 + ], //商品图片 + "needLogistics": isLogistics == true ? 1 : 0, //需要物流:1-需要 0-不需要 + "productName": "新建商品", //商品名字 + "productType": 0, //商品类型(0:普通类型;1:拼盘类型)app新增商品用不到,默认传0 + "shortName": "商品简介", //商品简介 "skuAttrList": [ { - "attrCode": "",//规格的数据编码,app新增商品用不到,但必须传"" - "attrName": "",//属性名称,app新增商品用不到,但必须传"" - "needImg": 0,//是否需要图片,app新增商品用不到,但必须传0 + "attrCode": "", //规格的数据编码,app新增商品用不到,但必须传"" + "attrName": "", //属性名称,app新增商品用不到,但必须传"" + "needImg": 0, //是否需要图片,app新增商品用不到,但必须传0 "attrValueList": [ - {"attrValue": "商品规格",//商品规格 + { + "attrValue": "商品规格", //商品规格 "attrValueCode": "", //规格值的数据编码,app新增商品用不到,但必须传"" - }]//规格对应的规格值 + } + ] //规格对应的规格值 } - ],//规格列表 + ], //规格列表 "skuList": [ { - "applyPrice": "234",//商品原价 - "skuAttrCodeDTOList": [{"attrCode": "", "attrValueCode": ""}],//sku对应的规格编码,app新增商品用不到,但必须传该段 - "skuPrice": "123",//商品售价 - "packagingFee": "789",//打包费 - "skuStock": "666",//库存 - "weight": "222"//重量 - }],//商品sku列表 - "status":isGround == true ? 1:0 //状态:1-上架 0-下架 + "applyPrice": "234", + //商品原价 + "skuAttrCodeDTOList": [ + {"attrCode": "", "attrValueCode": ""} + ], + //sku对应的规格编码,app新增商品用不到,但必须传该段 + "skuPrice": "123", + //商品售价 + "packagingFee": "789", + //打包费 + "skuStock": "666", + //库存 + "weight": "222" + //重量 + } + ], //商品sku列表 + "status": isGround == true ? 1 : 0 //状态:1-上架 0-下架 }).catchError((error) { networkError = AppUtils.dioErrorTypeToString(error.type); networkStatus = -1; @@ -190,19 +202,19 @@ class _AddGoodsPage extends State { if (baseData != null && baseData.isSuccess) { SmartDialog.show( widget: SettlementTips( - () {}, - text: "新建商品成功", - color: Color(0xFF30415B), - )); + () {}, + text: "新建商品成功", + color: Color(0xFF30415B), + )); networkStatus = 1; setState(() {}); } else { SmartDialog.show( widget: SettlementTips( - () {}, - text: baseData.msg, - color: Color(0xFF30415B), - )); + () {}, + text: baseData.msg, + color: Color(0xFF30415B), + )); } } finally {} } @@ -249,17 +261,19 @@ class _AddGoodsPage extends State { children: [ GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { officialCategory(); - }, - child:textSelectItem("官方分类",categoryName == "" ? "请选择":categoryName), + }, + child: textSelectItem( + "官方分类", categoryName == "" ? "请选择" : categoryName), ), GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { goodsGroup(); }, - child:textSelectItem("商品分组",groupName == "" ? "请选择":groupName)), + child: textSelectItem( + "商品分组", groupName == "" ? "请选择" : groupName)), ], ), ), @@ -269,7 +283,9 @@ class _AddGoodsPage extends State { margin: EdgeInsets.only(top: 12.h), child: Column( children: [ - Padding(padding: EdgeInsets.only(top: 18.h,left: 16.w,right: 16.w), + Padding( + padding: + EdgeInsets.only(top: 18.h, left: 16.w, right: 16.w), child: Row( children: [ Padding( @@ -284,13 +300,15 @@ class _AddGoodsPage extends State { )), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ - setState((){ + onTap: () { + setState(() { isAttrStyle = !isAttrStyle; }); }, child: Image.asset( - isAttrStyle == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", + isAttrStyle == true + ? "assets/image/reservation_switch.webp" + : "assets/image/reservation_unswitch.webp", width: 44.w, height: 24.h, ), @@ -301,133 +319,152 @@ class _AddGoodsPage extends State { width: double.infinity, height: 1.w, color: Color(0x14000000), - margin: EdgeInsets.only(top: 16.h,left: 16.w,right: 16.w), + margin: + EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w), ), - isAttrStyle == true ? GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: (){ - Navigator.of(context).pushNamed( - '/router/set_goods_specs'); - }, - child:Container( - padding: EdgeInsets.only(left: 16.w,right: 16.w,top: 16.h), - child:Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded(child:Text( - "商品规格", - style: TextStyle( - color: Color(0xFF0D0D0D), - fontSize: 14.sp, - fontWeight: FontWeight.bold, + isAttrStyle == true + ? GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pushNamed( + '/router/set_goods_specs', + arguments: { + "goodsSpecsDetails": goodsSpecsDetails + }).then((value) { + if (value != null) { + goodsSpecsDetails.clear(); + goodsSpecsDetails.addAll(value); + setState(() {}); + } + }); + }, + child: Container( + padding: EdgeInsets.only( + left: 16.w, right: 16.w, top: 16.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Text( + "商品规格", + style: TextStyle( + color: Color(0xFF0D0D0D), + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), + )), + Text( + "请设置商品规格", + style: TextStyle( + color: Color(0xFF7A797F), + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), + ), + Image.asset( + "assets/image/bs_right.webp", + width: 16.h, + height: 16.h, + ), + ], ), - )), - Text( - "请设置商品规格", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, + Container( + margin: EdgeInsets.only(top: 16.h), + color: Color(0x14000000), + height: 1.h, + width: double.infinity, ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - Container( - margin: EdgeInsets.only(top: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, + ], + ), ), - ], - ), - ), - ): textItem("商品规格", skuController, "请输入商品规格"), - if(isAttrStyle == false) - textItem("商品重量", heftController, "请输入商品重量"), - if(isAttrStyle == false) - textItem("商品售价", priceController, "请输入商品售卖价格"), - if(isAttrStyle == false) - textItem("商品原价", originalPriceController, "请输入商品划线价格"), - if(isAttrStyle == false) - textItem("打包费", packingChargeController, "请输入商品打包费用"), - if(isAttrStyle == false) - textItem("商品库存", stockController, "请输入商品库存"), - if(isAttrStyle == false) - GestureDetector( - behavior: HitTestBehavior.opaque, - onTap:(){ - Navigator.of(context).pushNamed( - '/router/set_meal',arguments:{"storeId":widget.arguments["storeId"],"mealDetails":mealDetails}).then((value){ - if (value != null){ - mealDetails.clear(); - mealDetails.addAll(value); - setState((){}); - } - }); - }, - child: Padding(padding: EdgeInsets.symmetric(horizontal: 16.w,vertical:16.h), - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child:Text( - "设置套餐", + ) + : textItem("商品规格", skuController, "请输入商品规格"), + if (isAttrStyle == false) + textItem("商品重量", heftController, "请输入商品重量"), + if (isAttrStyle == false) + textItem("商品售价", priceController, "请输入商品售卖价格"), + if (isAttrStyle == false) + textItem("商品原价", originalPriceController, "请输入商品划线价格"), + if (isAttrStyle == false) + textItem("打包费", packingChargeController, "请输入商品打包费用"), + if (isAttrStyle == false) + textItem("商品库存", stockController, "请输入商品库存"), + if (isAttrStyle == false) + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pushNamed('/router/set_meal', + arguments: { + "mealDetails": mealDetails + }).then((value) { + if (value != null) { + mealDetails.clear(); + mealDetails.addAll(value); + setState(() {}); + } + }); + }, + child: Padding( + padding: EdgeInsets.symmetric( + horizontal: 16.w, vertical: 16.h), + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: Text( + "设置套餐", + style: TextStyle( + color: Color(0xD9000000), + fontSize: 14.sp, + fontWeight: FontWeight.bold, + ), + ), + ), + Text( + "套餐选择", style: TextStyle( - color: Color(0xD9000000), + color: Color(0xFF7A797F), fontSize: 14.sp, fontWeight: FontWeight.bold, ), ), - ), - Text( - "套餐选择", - style: TextStyle( - color: Color(0xFF7A797F), - fontSize: 14.sp, - fontWeight: FontWeight.bold, + Image.asset( + "assets/image/bs_right.webp", + width: 16.h, + height: 16.h, ), - ), - Image.asset( - "assets/image/bs_right.webp", - width: 16.h, - height: 16.h, - ), - ], - ), - Container( - margin:EdgeInsets.only(top: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, - ), - ], - ),), - ), + ], + ), + Container( + margin: EdgeInsets.only(top: 16.h), + color: Color(0x14000000), + height: 1.h, + width: double.infinity, + ), + ], + ), + ), + ), Container( width: double.infinity, padding: EdgeInsets.symmetric(vertical: 16.h), - margin: EdgeInsets.only(top: 111.h, bottom: 34.h,left:16.w,right:16.w), + margin: EdgeInsets.only( + top: 111.h, bottom: 34.h, left: 16.w, right: 16.w), decoration: BoxDecoration( color: Color(0xFF30415B), borderRadius: BorderRadius.circular(27), ), alignment: Alignment.center, child: Text( - S - .of(context) - .baocun, + S.of(context).baocun, style: TextStyle( color: Colors.white, fontSize: 16.sp, @@ -541,36 +578,36 @@ class _AddGoodsPage extends State { ), Expanded( child: Container( - padding: EdgeInsets.only(left: 8.w), - margin: EdgeInsets.only(left: 22.w, bottom: 16.h), - decoration: BoxDecoration( - color: Color(0xFFFCFCFC), - border: Border.all( - color: Color(0xFFEBEBEB), - width: 1, - ), - borderRadius: BorderRadius.circular(2), - ), - alignment: Alignment.topLeft, - child: TextField( - maxLines: 5, - controller: profileController, - onChanged: (value) { - setState(() { - // textLength = value.length; - }); - }, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "请输入商品商品简介", - hintStyle: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.bold, - color: Color(0xFF7A797F), - ), - ), + padding: EdgeInsets.only(left: 8.w), + margin: EdgeInsets.only(left: 22.w, bottom: 16.h), + decoration: BoxDecoration( + color: Color(0xFFFCFCFC), + border: Border.all( + color: Color(0xFFEBEBEB), + width: 1, + ), + borderRadius: BorderRadius.circular(2), + ), + alignment: Alignment.topLeft, + child: TextField( + maxLines: 5, + controller: profileController, + onChanged: (value) { + setState(() { + // textLength = value.length; + }); + }, + decoration: InputDecoration( + border: InputBorder.none, + hintText: "请输入商品商品简介", + hintStyle: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.bold, + color: Color(0xFF7A797F), ), - )) + ), + ), + )) ], ), ], @@ -588,7 +625,7 @@ class _AddGoodsPage extends State { Row( children: [ Expanded( - child:Row( + child: Row( children: [ Padding( padding: EdgeInsets.only(right: 20.h), @@ -602,13 +639,15 @@ class _AddGoodsPage extends State { )), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ - setState((){ + onTap: () { + setState(() { isLogistics = !isLogistics; }); }, child: Image.asset( - isLogistics == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", + isLogistics == true + ? "assets/image/reservation_switch.webp" + : "assets/image/reservation_unswitch.webp", width: 44.w, height: 24.h, ), @@ -617,7 +656,7 @@ class _AddGoodsPage extends State { ), ), Expanded( - child:Row( + child: Row( children: [ Padding( padding: EdgeInsets.only(right: 20.h), @@ -631,13 +670,15 @@ class _AddGoodsPage extends State { )), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ - setState((){ + onTap: () { + setState(() { isGround = !isGround; }); }, child: Image.asset( - isGround == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", + isGround == true + ? "assets/image/reservation_switch.webp" + : "assets/image/reservation_unswitch.webp", width: 44.w, height: 24.h, ), @@ -656,7 +697,7 @@ class _AddGoodsPage extends State { Row( children: [ Expanded( - child:Row( + child: Row( children: [ Padding( padding: EdgeInsets.only(right: 20.h), @@ -670,20 +711,23 @@ class _AddGoodsPage extends State { )), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ - setState((){ + onTap: () { + setState(() { isOversold = !isOversold; }); }, child: Image.asset( - isOversold == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", + isOversold == true + ? "assets/image/reservation_switch.webp" + : "assets/image/reservation_unswitch.webp", width: 44.w, height: 24.h, ), ), ], ), - ), Expanded( + ), + Expanded( child: Row( children: [ Padding( @@ -698,13 +742,15 @@ class _AddGoodsPage extends State { )), GestureDetector( behavior: HitTestBehavior.opaque, - onTap:(){ - setState((){ + onTap: () { + setState(() { isSetMeal = !isSetMeal; }); }, child: Image.asset( - isSetMeal == true ? "assets/image/reservation_switch.webp":"assets/image/reservation_unswitch.webp", + isSetMeal == true + ? "assets/image/reservation_switch.webp" + : "assets/image/reservation_unswitch.webp", width: 44.w, height: 24.h, ), @@ -725,7 +771,7 @@ class _AddGoodsPage extends State { ); } - Widget textSelectItem(left,selectName) { + Widget textSelectItem(left, selectName) { return Container( padding: EdgeInsets.symmetric(horizontal: 16.w), child: Column( @@ -787,72 +833,72 @@ class _AddGoodsPage extends State { Widget mustTextItem(left, rightController, right) { return Container( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text.rich( + Expanded( + child: Text.rich( + TextSpan( + children: [ TextSpan( - children: [ - TextSpan( - text: "*", - style: TextStyle( - color: Color(0xFFE02020), - fontSize: 14.sp, - fontWeight: FontWeight.w500, - ), - ), - TextSpan( - text: left, - style: TextStyle( - color: Color(0xD9000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold, - ), - ), - ], + text: "*", + style: TextStyle( + color: Color(0xFFE02020), + fontSize: 14.sp, + fontWeight: FontWeight.w500, + ), ), - ), - ), - Expanded( - child: TextField( - controller: rightController, - decoration: InputDecoration( - hintText: right ?? "", - hintTextDirection: TextDirection.rtl, - hintStyle: TextStyle( - color: Color(0xFF7A797F), + TextSpan( + text: left, + style: TextStyle( + color: Color(0xD9000000), fontSize: 14.sp, fontWeight: MyFontWeight.bold, ), - border: InputBorder.none, ), - textAlign: TextAlign.right, - style: TextStyle( - color: Color(0xFF000000), - fontSize: 14.sp, - fontWeight: MyFontWeight.bold), - ), - flex: 2, + ], ), - ], + ), ), - Container( - margin: EdgeInsets.only(bottom: 16.h), - color: Color(0x14000000), - height: 1.h, - width: double.infinity, + Expanded( + child: TextField( + controller: rightController, + decoration: InputDecoration( + hintText: right ?? "", + hintTextDirection: TextDirection.rtl, + hintStyle: TextStyle( + color: Color(0xFF7A797F), + fontSize: 14.sp, + fontWeight: MyFontWeight.bold, + ), + border: InputBorder.none, + ), + textAlign: TextAlign.right, + style: TextStyle( + color: Color(0xFF000000), + fontSize: 14.sp, + fontWeight: MyFontWeight.bold), + ), + flex: 2, ), ], - )); + ), + Container( + margin: EdgeInsets.only(bottom: 16.h), + color: Color(0x14000000), + height: 1.h, + width: double.infinity, + ), + ], + )); } Widget textItem(left, rightController, right) { return Container( - padding: EdgeInsets.symmetric(horizontal: 16.w), + padding: EdgeInsets.symmetric(horizontal: 16.w), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -909,9 +955,9 @@ class _AddGoodsPage extends State { backgroundColor: Colors.transparent, builder: (context) { return StatefulBuilder(builder: ( - context, - state, - ) { + context, + state, + ) { return Container( width: double.infinity, height: 365.h, @@ -932,18 +978,18 @@ class _AddGoodsPage extends State { children: [ Expanded( child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择官方分类", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 12.h, bottom: 12.h, left: 41.w), + child: Text( + "选择官方分类", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 16.sp, + color: Color(0xFF1A1A1A), + ), + ), + )), GestureDetector( onTap: () { state(() { @@ -961,9 +1007,10 @@ class _AddGoodsPage extends State { ), ], ), - Expanded(child:ListView.builder( + Expanded( + child: ListView.builder( padding: EdgeInsets.zero, - itemCount: goodsCategoryList?.length ??0, + itemCount: goodsCategoryList?.length ?? 0, scrollDirection: Axis.vertical, shrinkWrap: true, physics: BouncingScrollPhysics(), @@ -974,21 +1021,24 @@ class _AddGoodsPage extends State { categoryIndex = position; }); }, - child: categoryItem(goodsCategoryList[position],position), + child: + categoryItem(goodsCategoryList[position], position), ); }, )), GestureDetector( onTap: () { setState(() { - categoryName = goodsCategoryList[categoryIndex].categoryName; + categoryName = + goodsCategoryList[categoryIndex].categoryName; Navigator.of(context).pop(); }); }, child: Container( width: double.infinity, alignment: Alignment.center, - margin: EdgeInsets.symmetric(vertical:25.h,horizontal:16.w), + margin: EdgeInsets.symmetric( + vertical: 25.h, horizontal: 16.w), padding: EdgeInsets.symmetric(vertical: 16.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(27), @@ -1010,10 +1060,10 @@ class _AddGoodsPage extends State { }); } - Widget categoryItem(GoodsCategoryList goodsCategoryList,index){ - return Container( + Widget categoryItem(GoodsCategoryList goodsCategoryList, index) { + return Container( height: 52.h, - margin: EdgeInsets.only(bottom: 12,left:16.w,right: 16.w), + margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), child: Stack( alignment: Alignment.bottomRight, children: [ @@ -1026,17 +1076,13 @@ class _AddGoodsPage extends State { : Color(0xFFF7F7F7), borderRadius: BorderRadius.circular(4.w), border: Border.all( - color: categoryIndex == index - ? Color(0xFF30415B) - : Colors.white, + color: + categoryIndex == index ? Color(0xFF30415B) : Colors.white, width: categoryIndex == index ? 1.w : 0, ), ), padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), + top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), child: Text( goodsCategoryList?.categoryName ?? "", style: TextStyle( @@ -1066,9 +1112,9 @@ class _AddGoodsPage extends State { backgroundColor: Colors.transparent, builder: (context) { return StatefulBuilder(builder: ( - context, - state, - ) { + context, + state, + ) { return Container( width: double.infinity, height: 365.h, @@ -1089,18 +1135,18 @@ class _AddGoodsPage extends State { children: [ Expanded( child: Container( - alignment: Alignment.center, - margin: EdgeInsets.only( - top: 12.h, bottom: 12.h, left: 41.w), - child: Text( - "选择官方分类", - style: TextStyle( - fontWeight: MyFontWeight.bold, - fontSize: 16.sp, - color: Color(0xFF1A1A1A), - ), - ), - )), + alignment: Alignment.center, + margin: EdgeInsets.only( + top: 12.h, bottom: 12.h, left: 41.w), + child: Text( + "选择官方分类", + style: TextStyle( + fontWeight: MyFontWeight.bold, + fontSize: 16.sp, + color: Color(0xFF1A1A1A), + ), + ), + )), GestureDetector( onTap: () { state(() { @@ -1118,7 +1164,8 @@ class _AddGoodsPage extends State { ), ], ), - Expanded(child:ListView.builder( + Expanded( + child: ListView.builder( padding: EdgeInsets.zero, itemCount: productGroupList?.records?.length ?? 0, scrollDirection: Axis.vertical, @@ -1131,21 +1178,25 @@ class _AddGoodsPage extends State { groupIndex = position; }); }, - child: groupItem(productGroupList.records[position],position), + child: groupItem( + productGroupList.records[position], position), ); }, )), GestureDetector( onTap: () { setState(() { - groupName = productGroupList?.records[groupIndex]?.groupName ?? ""; + groupName = + productGroupList?.records[groupIndex]?.groupName ?? + ""; Navigator.of(context).pop(); }); }, child: Container( width: double.infinity, alignment: Alignment.center, - margin: EdgeInsets.symmetric(vertical:25.h,horizontal:16.w), + margin: EdgeInsets.symmetric( + vertical: 25.h, horizontal: 16.w), padding: EdgeInsets.symmetric(vertical: 16.h), decoration: BoxDecoration( borderRadius: BorderRadius.circular(27), @@ -1167,10 +1218,10 @@ class _AddGoodsPage extends State { }); } - Widget groupItem(Records records,index){ - return Container( + Widget groupItem(Records records, index) { + return Container( height: 52.h, - margin: EdgeInsets.only(bottom: 12,left:16.w,right: 16.w), + margin: EdgeInsets.only(bottom: 12, left: 16.w, right: 16.w), child: Stack( alignment: Alignment.bottomRight, children: [ @@ -1178,24 +1229,18 @@ class _AddGoodsPage extends State { height: 52.h, width: double.infinity, decoration: BoxDecoration( - color: groupIndex == index - ? Color(0xFFEFF5FF) - : Color(0xFFF7F7F7), + color: + groupIndex == index ? Color(0xFFEFF5FF) : Color(0xFFF7F7F7), borderRadius: BorderRadius.circular(4.w), border: Border.all( - color: groupIndex == index - ? Color(0xFF30415B) - : Colors.white, + color: groupIndex == index ? Color(0xFF30415B) : Colors.white, width: groupIndex == index ? 1.w : 0, ), ), padding: EdgeInsets.only( - top: 16.h, - bottom: 16.h, - left: 16.w, - right: 17.w), + top: 16.h, bottom: 16.h, left: 16.w, right: 17.w), child: Text( - records?.groupName ?? "", + records?.groupName ?? "", style: TextStyle( fontSize: 14.sp, fontWeight: MyFontWeight.medium, diff --git a/lib/business_system/goods/add_goods/edit_specs_detail.dart b/lib/business_system/goods/add_goods/edit_specs_detail.dart index 8941c6ad..f2f7d237 100644 --- a/lib/business_system/goods/add_goods/edit_specs_detail.dart +++ b/lib/business_system/goods/add_goods/edit_specs_detail.dart @@ -125,10 +125,10 @@ class _EditSpecsDetail extends State { specsDetail.add({ "skuName": element.specsDetailName, "goodPrice": element.goodPriceController.text, - "originalPrice": element.originalPriceController.text, - "packagingFee": element.packagingFeeController.text, - "specsWeight": element.specsWeightController.text, - "skuStock": element.skuStockController.text + "originalPrice": element.originalPriceController.text == "" ? "0" :element.originalPriceController.text, + "packagingFee": element.packagingFeeController.text == "" ? "0" :element.packagingFeeController.text, + "specsWeight": element.specsWeightController.text == "" ? "0" :element.specsWeightController.text, + "skuStock": element.skuStockController.text == "" ? "0" :element.skuStockController.text }); }); if (flag) { diff --git a/lib/business_system/goods/add_goods/set_goods_specs.dart b/lib/business_system/goods/add_goods/set_goods_specs.dart index 02de55c6..707d6d61 100644 --- a/lib/business_system/goods/add_goods/set_goods_specs.dart +++ b/lib/business_system/goods/add_goods/set_goods_specs.dart @@ -3,7 +3,6 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../../retrofit/business_api.dart'; -import '../../../retrofit/data/edit_specs_detail_list.dart'; import '../../../retrofit/data/set_specs_list.dart'; import '../../../utils/font_weight.dart'; import '../../../view_widget/settlement_tips_dialog.dart'; @@ -43,6 +42,14 @@ class _SetGoodsSpecs extends State { } }); }); + List goodsSpecsDetails = widget?.arguments["goodsSpecsDetails"] ??[]; + goodsSpecsDetails.forEach((element) { + var tempValue = SetSpecsList(); + tempValue.specsNameController.text = element["specsName"]; + tempValue.specsValues = element["specsValue"]; + specsDetails.addAll(element["valueDetail"]); + specs.add(tempValue); + }); } ///离开页面记着销毁和清除 @@ -257,6 +264,7 @@ class _SetGoodsSpecs extends State { onTap: () { bool flag = false; String tipText = ""; + List goodsSpecsDetail = []; specs.forEach((element) { if (element.specsNameController.text .trim() == @@ -270,7 +278,16 @@ class _SetGoodsSpecs extends State { flag = true; tipText = "未添加规格值,请先添加规格值"; return; + }else if(specsDetails.length == 0){ + flag = true; + tipText = "请设置规格明细"; + return; } + goodsSpecsDetail.add({ + "specsName": element.specsNameController.text, + "specsValue":element.specsValues, + "valueDetail":specsDetails + }); }); if (flag) { SmartDialog.show( @@ -281,7 +298,8 @@ class _SetGoodsSpecs extends State { color: Color(0xFF30415B), )); } else { - // Navigator.of(context).pop(); + print(goodsSpecsDetail); + Navigator.of(context).pop(goodsSpecsDetail); } }, child: Container( diff --git a/lib/business_system/goods/on_sale/batch_shelf.dart b/lib/business_system/goods/on_sale/batch_shelf.dart index a2a613ff..ff1e6ee7 100644 --- a/lib/business_system/goods/on_sale/batch_shelf.dart +++ b/lib/business_system/goods/on_sale/batch_shelf.dart @@ -27,6 +27,7 @@ class BatchShelf extends StatefulWidget { final Map arguments; BatchShelf({this.arguments}); + @override State createState() { return _BatchShelf(); @@ -66,13 +67,17 @@ class _BatchShelf extends State { status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); SharedPreferences.getInstance().then((value) { - businessService = BusinessApiService(Dio(), + businessService = BusinessApiService( + Dio(), context: context, token: BusinessInstance.instance.businessToken, tenant: BusinessInstance.instance.businessTenant, - storeId: widget.arguments["storeId"],); + storeId: widget.arguments["storeId"], + ); queryProductGroupList(); - queryGoodsList(groupIndex != -1 ? productGroupList.records[groupIndex].id : "", isSing: false); + queryGoodsList( + groupIndex != -1 ? productGroupList.records[groupIndex].id : "", + isSing: false); }); } @@ -97,8 +102,7 @@ class _BatchShelf extends State { "order": "ascending", "size": 100, "sort": "sort" - }).catchError((error) { - }); + }).catchError((error) {}); if (!mounted) return; if (baseData != null && baseData.isSuccess) { productGroupList = baseData.data; @@ -114,7 +118,7 @@ class _BatchShelf extends State { queryGoodsList(groupId, {isSing = true}) async { try { BaseData baseData = - await businessService.findAdminProductLis({ + await businessService.findAdminProductLis({ "groupId": groupId, "hasStock": "", "keyword": "", @@ -150,7 +154,7 @@ class _BatchShelf extends State { } queryGoodsUpdate() async { - try{ + try { EasyLoading.show( status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); @@ -169,16 +173,17 @@ class _BatchShelf extends State { if (baseData != null && baseData.isSuccess) { _pageIndex = 1; adminProductVoList.clear(); - await queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex]?.id ?? "", isSing: false); + await queryGoodsList( + groupIndex == -1 + ? "" + : productGroupList?.records[groupIndex]?.id ?? "", + isSing: false); setState(() {}); SmartDialog.showToast("商品下架成功", alignment: Alignment.center); } else { SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } - } - finally{ + } finally { EasyLoading.dismiss(); } } @@ -195,24 +200,21 @@ class _BatchShelf extends State { brightness: Brightness.dark, action: GestureDetector( behavior: HitTestBehavior.opaque, - onTap: (){ + onTap: () { List> goodsMeal = []; - if(titleName == "批量下架"){ - if (productIds.length != 0) - productIds.clear(); + if (titleName == "批量下架") { + if (productIds.length != 0) productIds.clear(); adminProductVoList.forEach((element) { if (element.isSelect) productIds.add(element.id); }); if (productIds.length == 0) { - SmartDialog.showToast("请选择要下架的商品", - alignment: Alignment.center); + SmartDialog.showToast("请选择要下架的商品", alignment: Alignment.center); return; } else { showGoodsStateDialog(); } - }else{ - if(goodsMeal.length != 0) - goodsMeal.clear(); + } else { + if (goodsMeal.length != 0) goodsMeal.clear(); adminProductVoList.forEach((element) { if (element.isSelect) goodsMeal.add({ @@ -222,8 +224,7 @@ class _BatchShelf extends State { }); Navigator.of(context).pop(goodsMeal); if (goodsMeal.length == 0) { - SmartDialog.showToast("请选择要增加的商品", - alignment: Alignment.center); + SmartDialog.showToast("请选择要增加的商品", alignment: Alignment.center); return; } } @@ -241,105 +242,108 @@ class _BatchShelf extends State { ), ), ), - body: networkStatus == -1 ? noNetwork() : Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 100.w, - height: double.infinity, - padding: EdgeInsets.only(bottom: 70.h), - color: Color(0xFFFAFAFA), - child:networkStatus == 0 - ? ListView.builder( - itemCount: 10, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfLeftItemSm(); - }, - ) - : ListView.builder( - itemCount: productGroupList?.records?.length ?? 0, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: () { - groupIndex = position; - _pageIndex = 1; - adminProductVoList.clear(); - queryGoodsList(productGroupList?.records[position].id,); - }, - child: shelfLeftItem( - productGroupList.records[position], - position), - ); - }, - ), - ), - Container( - width: MediaQuery.of(context).size.width - 100.w, - child: SmartRefresher( - controller: _refreshController, - enablePullDown: true, - enablePullUp: - adminProductVoList.length != 0 ? true : false, - header: MyHeader( - color: Color(0xFF30415B), - ), - physics: BouncingScrollPhysics(), - footer: CustomFooter( - builder: (context, mode) { - return MyFooter(mode); - }, + body: networkStatus == -1 + ? noNetwork() + : Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: 100.w, + height: double.infinity, + padding: EdgeInsets.only(bottom: 70.h), + color: Color(0xFFFAFAFA), + child: networkStatus == 0 + ? ListView.builder( + itemCount: 10, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return shelfLeftItemSm(); + }, + ) + : ListView.builder( + itemCount: productGroupList?.records?.length ?? 0, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + groupIndex = position; + _pageIndex = 1; + adminProductVoList.clear(); + queryGoodsList( + productGroupList?.records[position].id, + ); + }, + child: shelfLeftItem( + productGroupList.records[position], position), + ); + }, + ), ), - onLoading: () { - _pageIndex++; - queryGoodsList(groupIndex == -1 - ? "" - : productGroupList?.records[groupIndex].id); - }, - onRefresh: () { - _pageIndex = 1; - adminProductVoList.clear(); - _onRefresh(isShowLoad: false); - }, - child: Container( - color: Colors.white, - child: networkStatus == 0 - ? ListView.builder( - itemCount: 10, + Container( + width: MediaQuery.of(context).size.width - 100.w, + child: SmartRefresher( + controller: _refreshController, + enablePullDown: true, + enablePullUp: + adminProductVoList.length != 0 ? true : false, + header: MyHeader( + color: Color(0xFF30415B), + ), physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfGoodsItemSm(); + footer: CustomFooter( + builder: (context, mode) { + return MyFooter(mode); + }, + ), + onLoading: () { + _pageIndex++; + queryGoodsList(groupIndex == -1 + ? "" + : productGroupList?.records[groupIndex].id); }, - ) - : ((adminProductVoList == null || - adminProductVoList.length == 0) - ? NoDataView( - src: - "assets/image/bs_no data_logo.webp", - isShowBtn: false, - text: "该分组暂无添加商品", - fontSize: 16.sp, - margin: EdgeInsets.all(20.h), - ) - : ListView.builder( - itemCount: - adminProductVoList?.length ?? 0, - controller: controller, - physics: BouncingScrollPhysics(), - shrinkWrap: true, - itemBuilder: (context, position) { - return shelfGoodsItem(adminProductVoList[position]); + onRefresh: () { + _pageIndex = 1; + adminProductVoList.clear(); + _onRefresh(isShowLoad: false); }, - )))), - ), - ], - ), + child: Container( + color: Colors.white, + child: networkStatus == 0 + ? ListView.builder( + itemCount: 10, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return shelfGoodsItemSm(); + }, + ) + : ((adminProductVoList == null || + adminProductVoList.length == 0) + ? NoDataView( + src: "assets/image/bs_no data_logo.webp", + isShowBtn: false, + text: "该分组暂无添加商品", + fontSize: 16.sp, + margin: EdgeInsets.all(20.h), + ) + : ListView.builder( + itemCount: + adminProductVoList?.length ?? 0, + controller: controller, + physics: BouncingScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, position) { + return shelfGoodsItem( + adminProductVoList[position]); + }, + )))), + ), + ], + ), ); } @@ -419,7 +423,7 @@ class _BatchShelf extends State { } ///左边list - Widget shelfLeftItem(Records records, index){ + Widget shelfLeftItem(Records records, index) { return Container( color: groupIndex == index ? Colors.white : Color(0xFFFAFAFA), alignment: Alignment.center, @@ -430,25 +434,25 @@ class _BatchShelf extends State { children: [ Expanded( child: Text( - records?.groupName ?? "", - textAlign: TextAlign.center, - style: TextStyle( - color: + records?.groupName ?? "", + textAlign: TextAlign.center, + style: TextStyle( + color: groupIndex == index ? Color(0xFF30415B) : Color(0xFF626264), - fontSize: 12.sp, - fontWeight: groupIndex == index - ? MyFontWeight.semi_bold - : MyFontWeight.regular, - ), - )), + fontSize: 12.sp, + fontWeight: groupIndex == index + ? MyFontWeight.semi_bold + : MyFontWeight.regular, + ), + )), ], ), ); } - Widget shelfGoodsItem(AdminProductVoList adminProductVoList){ + Widget shelfGoodsItem(AdminProductVoList adminProductVoList) { return Container( - margin: EdgeInsets.only(bottom: 21.h,left: 16.w), + margin: EdgeInsets.only(bottom: 21.h, left: 16.w), child: Row( children: [ MImage( @@ -458,21 +462,25 @@ class _BatchShelf extends State { fit: BoxFit.cover, radius: BorderRadius.circular(4), ), - SizedBox(width:12.w,), - Expanded(child:Column( + SizedBox( + width: 12.w, + ), + Expanded( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding(padding:EdgeInsets.only(top: 2.h), - child:Text( - adminProductVoList?.productName ?? "", - maxLines:1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - fontWeight: MyFontWeight.medium, - color: Color(0xFF000000), - ), - )), + Padding( + padding: EdgeInsets.only(top: 2.h), + child: Text( + adminProductVoList?.productName ?? "", + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.medium, + color: Color(0xFF000000), + ), + )), Row( children: [ Text( @@ -483,8 +491,11 @@ class _BatchShelf extends State { color: Color(0xFFA29E9E), ), ), - SizedBox(width: 8.w,), - Expanded(child: Text( + SizedBox( + width: 8.w, + ), + Expanded( + child: Text( "销量${adminProductVoList?.sellCount ?? 0}", style: TextStyle( fontSize: 10.sp, @@ -496,7 +507,8 @@ class _BatchShelf extends State { value: adminProductVoList.isSelect, onChanged: (a) { setState(() { - adminProductVoList.isSelect = !adminProductVoList.isSelect; + adminProductVoList.isSelect = + !adminProductVoList.isSelect; }); }, shape: RoundedRectangleBorder( @@ -507,10 +519,13 @@ class _BatchShelf extends State { ), ], ), - SizedBox(height:7.h,), + SizedBox( + height: 7.h, + ), Row( children: [ - Expanded(child:Text.rich( + Expanded( + child: Text.rich( TextSpan( children: [ TextSpan( @@ -532,48 +547,49 @@ class _BatchShelf extends State { ], ), )), - if(titleName == "选择商品") - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap:(){ - setState((){ - if(adminProductVoList.goodsNumber <= 1) - return; - adminProductVoList?.goodsNumber = adminProductVoList.goodsNumber - 1; + if (titleName == "选择商品") + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + if (adminProductVoList.goodsNumber <= 1) return; + adminProductVoList?.goodsNumber = + adminProductVoList.goodsNumber - 1; + }); + }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: Icon( + Icons.remove_circle_outline, + color: Color(0xFF30415B), + size: 24, + ))), + if (titleName == "选择商品") + Text( + adminProductVoList?.goodsNumber?.toString() ?? "", + style: TextStyle( + color: Color(0xD9000000), + fontSize: 20.sp, + fontWeight: MyFontWeight.regular, + ), + ), + if (titleName == "选择商品") + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + setState(() { + adminProductVoList.goodsNumber = + adminProductVoList.goodsNumber + 1; }); }, child: Container( - padding: EdgeInsets.symmetric(horizontal:10.w), - child: Icon( - Icons.remove_circle_outline, - color: Color(0xFF30415B), - size: 24, - ))), - if(titleName == "选择商品") - Text( - adminProductVoList?.goodsNumber?.toString() ?? "", - style: TextStyle( - color: Color(0xD9000000), - fontSize: 20.sp, - fontWeight: MyFontWeight.regular, + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: Icon( + Icons.add_circle, + color: Color(0xFF30415B), + size: 24, + )), ), - ), - if(titleName == "选择商品") - GestureDetector( - behavior:HitTestBehavior.opaque, - onTap:(){ - setState((){ - adminProductVoList.goodsNumber = adminProductVoList.goodsNumber + 1; - }); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal:10.w), - child: Icon( - Icons.add_circle, - color: Color(0xFF30415B), - size: 24, - )), - ), ], ), ], @@ -624,69 +640,39 @@ class _BatchShelf extends State { ), Expanded( child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 11.h, top: 2.h), - child: Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 124.w, - height: 20.h, - ), + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 11.h, top: 2.h), + child: Shimmer.fromColors( + baseColor: Color(0XFFD8D8D8), + highlightColor: Color(0XFFD8D8D8), + child: Container( + decoration: BoxDecoration( + color: Color(0XFFD8D8D8), + borderRadius: BorderRadius.circular(2), ), + width: 124.w, + height: 20.h, ), - Row( - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - SizedBox( - width: 8.w, - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 43.w, - height: 18.h, - ), - ), - Spacer(), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 16.h, - height: 16.h, - ), + ), + ), + Row( + children: [ + Shimmer.fromColors( + baseColor: Color(0XFFD8D8D8), + highlightColor: Color(0XFFD8D8D8), + child: Container( + decoration: BoxDecoration( + color: Color(0XFFD8D8D8), + borderRadius: BorderRadius.circular(2), ), - ], + width: 43.w, + height: 18.h, + ), ), SizedBox( - height: 7.h, + width: 8.w, ), Shimmer.fromColors( baseColor: Color(0XFFD8D8D8), @@ -696,12 +682,42 @@ class _BatchShelf extends State { color: Color(0XFFD8D8D8), borderRadius: BorderRadius.circular(2), ), - width: 28.w, - height: 20.h, + width: 43.w, + height: 18.h, + ), + ), + Spacer(), + Shimmer.fromColors( + baseColor: Color(0XFFD8D8D8), + highlightColor: Color(0XFFD8D8D8), + child: Container( + decoration: BoxDecoration( + color: Color(0XFFD8D8D8), + borderRadius: BorderRadius.circular(2), + ), + width: 16.h, + height: 16.h, ), ), ], - )), + ), + SizedBox( + height: 7.h, + ), + Shimmer.fromColors( + baseColor: Color(0XFFD8D8D8), + highlightColor: Color(0XFFD8D8D8), + child: Container( + decoration: BoxDecoration( + color: Color(0XFFD8D8D8), + borderRadius: BorderRadius.circular(2), + ), + width: 28.w, + height: 20.h, + ), + ), + ], + )), ], ), );