|
|
|
@ -9,6 +9,7 @@ import 'package:huixiang/utils/font_weight.dart';
|
|
|
|
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/separator.dart'; |
|
|
|
|
|
|
|
|
|
import '../../retrofit/data/shoppingCart.dart'; |
|
|
|
|
import '../../utils/flutter_utils.dart'; |
|
|
|
|
|
|
|
|
|
class OrderCommodity extends StatefulWidget { |
|
|
|
@ -182,7 +183,9 @@ class _OrderCommodity extends State<OrderCommodity> {
|
|
|
|
|
Widget commodityItem(OrderProductVOList productList) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), |
|
|
|
|
child: Row( |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
MImage( |
|
|
|
@ -268,7 +271,70 @@ class _OrderCommodity extends State<OrderCommodity> {
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
if (productList.setMealDataList.length != 0) |
|
|
|
|
ListView.builder( |
|
|
|
|
itemCount: productList.setMealDataList.length, |
|
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
shrinkWrap: true, |
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
itemBuilder: (context, index) { |
|
|
|
|
return orderMealsItem(productList.setMealDataList[index]); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget orderMealsItem(SetMealDataList setMealDataList) { |
|
|
|
|
return Column(children: setMealDataList.productInfoList.map((e) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.symmetric( |
|
|
|
|
vertical: 10.h, |
|
|
|
|
), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
flex: 2, |
|
|
|
|
child: Text( |
|
|
|
|
e.productName, |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
maxLines: 1, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xffA29E9E), |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
flex: 3, |
|
|
|
|
child: Text( |
|
|
|
|
"${(e.skuName == "") ? "" : e.skuName}", |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
maxLines: 1, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xffA29E9E), |
|
|
|
|
fontSize: 13.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"x${e.buyNumber.toString()}", |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
maxLines: 1, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(0xffFF7A1A), |
|
|
|
|
fontSize: 13.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
}).toList(),); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget discountItem(Color color, textName, condition, amount) { |
|
|
|
|