Browse Source

修复list无数据提示时显示灰色板块的bug;

订单详情新增物流单号显示;
new_revision_app
wurong 2 years ago
parent
commit
a6aaa7d2b2
  1. 16
      lib/order/order_history_page.dart
  2. 3
      lib/order/order_view/order_info.dart
  3. 3
      lib/utils/bridge.dart
  4. 66
      lib/view_widget/no_data_view.dart

16
lib/order/order_history_page.dart

@ -382,15 +382,13 @@ class _OrderHistoryList extends State<OrderHistoryList>
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( Expanded(
child: Container( child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, children: goodsItem((orderInfo != null &&
children: goodsItem((orderInfo != null && orderInfo.productList != null)
orderInfo.productList != null) ? orderInfo.productList
? orderInfo.productList : null),
: null),
),
), ),
flex: 1, flex: 1,
), ),

3
lib/order/order_view/order_info.dart

@ -48,6 +48,9 @@ class _OrderInfoView extends State<OrderInfoView> {
orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0 orderInfoItem(S.of(context).peisongfangshi, widget.isTakeOut == 0
? S.of(context).ziqu : widget.isTakeOut == 3 ? "打包":widget.isTakeOut == 4?"堂食":((widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送")), ? S.of(context).ziqu : widget.isTakeOut == 3 ? "打包":widget.isTakeOut == 4?"堂食":((widget.orderInfo != null && widget.orderInfo.logisticsName != "") ? widget.orderInfo.logisticsName : "美团配送")),
// orderInfoItem(S.of(context).peisongfangshi,"美团配送"), // orderInfoItem(S.of(context).peisongfangshi,"美团配送"),
if(widget.orderInfo != null && widget.orderInfo.logisticsNum != "" )
orderInfoItem("物流单号",
widget.orderInfo != null ? widget.orderInfo.logisticsNum : ""),
if(widget?.orderInfo?.subcribeTime != null && widget?.orderInfo?.subcribeTime != "") if(widget?.orderInfo?.subcribeTime != null && widget?.orderInfo?.subcribeTime != "")
orderInfoItem("预约时间", orderInfoItem("预约时间",
widget.orderInfo != null ? widget.orderInfo.subcribeTime : ""), widget.orderInfo != null ? widget.orderInfo.subcribeTime : ""),

3
lib/utils/bridge.dart

@ -1,6 +1,3 @@
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
class Bridge { class Bridge {

66
lib/view_widget/no_data_view.dart

@ -27,43 +27,41 @@ class NoDataView extends StatelessWidget {
return Container( return Container(
margin: margin, margin: margin,
alignment: Alignment.center, alignment: Alignment.center,
child: Expanded( child: Column(
child: Column( children: [
children: [ Image(
Image( image: AssetImage(src),
image: AssetImage(src), width: iconWidth,
width: iconWidth, height: iconHeight,
height: iconHeight, ),
SizedBox(
height: 35.h,
),
Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: fontSize,
height: 1.5,
color: Color(0xFF353535),
), ),
SizedBox( ),
height: 35.h, SizedBox(
), height: 10.h,
Text( ),
text, if (isShowBtn)
textAlign: TextAlign.center, Container(
style: TextStyle( margin: EdgeInsets.symmetric(horizontal: 16.w),
fontSize: fontSize, child: RoundButton(
height: 1.5, text: S.of(context).fanhuishouye,
color: Color(0xFF353535), textColor: Colors.white,
fontSize: 14.sp,
padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
), ),
), ),
SizedBox( ],
height: 10.h,
),
if (isShowBtn)
Container(
margin: EdgeInsets.symmetric(horizontal: 16.w),
child: RoundButton(
text: S.of(context).fanhuishouye,
textColor: Colors.white,
fontSize: 14.sp,
padding: EdgeInsets.all(12.w),
backgroup: Color(0xFF32A060),
radius: 4,
),
),
],
),
), ),
); );
} }

Loading…
Cancel
Save