Browse Source

兑换历史,门店充值列表,门店充值页面,会员卡详情页面,新增骨架屏;

订单列表ui更改;
dev
wurong 1 year ago
parent
commit
bd01bdfddb
  1. 141
      lib/mine/mine_shop_page.dart
  2. 361
      lib/mine/mine_shop_recharge.dart
  3. 232
      lib/order/exchange_history_page.dart
  4. 5
      lib/order/order_history_page.dart

141
lib/mine/mine_shop_page.dart

@ -20,6 +20,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
class MineShopPage extends StatefulWidget {
@override
@ -41,6 +42,7 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
FocusNode _focusNode = FocusNode();
bool hasFocus = true;
int priceOrder = 0;
int networkStatus = 0;
@override
void initState() {
@ -93,12 +95,14 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
await apiService.vipList({
"keywords":editingController.text,
}).catchError((error) {
networkStatus = -1;
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
coupons.clear();
coupons.addAll(baseData.data);
refreshController.refreshCompleted();
networkStatus = 1;
} else {
refreshController.refreshFailed();
}
@ -118,7 +122,7 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "店铺充值",
title: S.of(context).dianpuchongzhi,
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
@ -128,7 +132,7 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
Container(
color: Colors.white,
padding: EdgeInsets.only(top:10.h,bottom:18.h,),
child: searchShopItem(),
child: searchShop(),
),
Expanded(child: SmartRefresher(
enablePullDown: true,
@ -142,7 +146,14 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
controller: refreshController,
onRefresh: queryVipCard,
physics: BouncingScrollPhysics(),
child: (coupons != null && coupons.length > 0)
child: networkStatus == 0 ? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return shopItemSm();
},
):((coupons != null && coupons.length > 0)
? ListView.builder(
padding: EdgeInsets.symmetric(vertical: 8.h),
itemBuilder: (context, position) {
@ -169,7 +180,7 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
text: "还没有会员卡~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
),
)),
),)
],
),
@ -177,7 +188,7 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
);
}
Widget searchShopItem() {
Widget searchShop() {
return Container(
margin: EdgeInsets.fromLTRB(14.w, 0, 14.w, 0),
padding: EdgeInsets.symmetric(vertical: 6.h),
@ -237,7 +248,6 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
Widget shopItem(VipCard vipCard) {
return Container(
width:double.infinity,
// height:140.h,
margin: EdgeInsets.only(bottom: 12.h,top: 14.h,left: 14.w,right: 14.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
@ -350,4 +360,123 @@ class _MineShopPage extends State<MineShopPage> with WidgetsBindingObserver{
);
}
Widget shopItemSm(){
return Container(
width:double.infinity,
margin: EdgeInsets.only(bottom: 12.h,top: 14.h,left: 14.w,right: 14.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
borderRadius: new BorderRadius.only(
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
),
color: Color(0XFFD8D8D8),
),
padding: EdgeInsets.only(left: 12.w),
height: 62.h,
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 38.h,
height: 38.h,
),
),
SizedBox(width: 6,),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 111.w,
height: 21.h,
),
),
],
),
),
Container(
decoration: BoxDecoration(
borderRadius: new BorderRadius.only(
bottomRight: Radius.circular(6),
topRight: Radius.circular(6),
),
color: Colors.white,
),
padding: EdgeInsets.all(12.h),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 68.w,
height: 17.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 120.w,
height: 17.h,
),
),
],
),
SizedBox(height:4.h,),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 98.w,
height: 33.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 48.w,
height: 17.h,
),
),
SizedBox(width: 2,),
Image.asset(
"assets/image/icon_right_z.webp",
width: 16,
height: 16,
color: Color(0xFF262626),
)
],
),
],
),
),
],
),
);
}
}

361
lib/mine/mine_shop_recharge.dart

@ -17,6 +17,7 @@ import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../retrofit/data/member_recharge_list.dart';
import '../retrofit/data/rechargeActLists.dart';
@ -55,6 +56,7 @@ class _MineShopRecharge extends State<MineShopRecharge> {
String storeId;
String minToken;
final RefreshController refreshController = RefreshController();
int networkStatus = 0;
@override
void dispose() {
@ -87,9 +89,12 @@ class _MineShopRecharge extends State<MineShopRecharge> {
"id": widget.arguments["id"],
"latitude": "",
"longitude": "",
}).catchError((onError) {});
}).catchError((onError) {
networkStatus = -1;
});
if (baseData != null && baseData.isSuccess) {
vipCard = baseData.data;
networkStatus = 1;
}
} finally {
if (isSingle)
@ -129,9 +134,12 @@ class _MineShopRecharge extends State<MineShopRecharge> {
queryRechargeActList() async {
try {
BaseData<List<MemberRechargeList>> baseData =
await minService.memberRechargeList().catchError((onError) {});
await minService.memberRechargeList().catchError((onError) {
networkStatus = -1;
});
if (baseData != null && baseData.isSuccess) {
memberRechargeList = baseData.data;
networkStatus = 1;
}
} finally {
addLoadCount();
@ -224,7 +232,7 @@ class _MineShopRecharge extends State<MineShopRecharge> {
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "店铺充值",
title: S.of(context).dianpuchongzhi,
titleColor: Colors.black,
background: Colors.white,
brightness: Brightness.dark,
@ -242,7 +250,9 @@ class _MineShopRecharge extends State<MineShopRecharge> {
controller: refreshController,
onRefresh: _onRefresh,
physics: BouncingScrollPhysics(),
child: Column(
child: networkStatus == 0
? skeletonScreen()
: Column(
children: [
shopRechargeCard(),
(memberRechargeList != null &&
@ -273,8 +283,8 @@ class _MineShopRecharge extends State<MineShopRecharge> {
isShowBtn: false,
text: "当前店铺暂无充值套餐~",
fontSize: 16.sp,
margin:
EdgeInsets.only(top: 90.h, left: 60.w, right: 60.w),
margin: EdgeInsets.only(
top: 90.h, left: 60.w, right: 60.w),
),
if (memberRechargeList != null &&
(memberRechargeList?.length ?? 0) > 0)
@ -380,7 +390,10 @@ class _MineShopRecharge extends State<MineShopRecharge> {
borderRadius: BorderRadius.circular(27),
),
margin: EdgeInsets.only(
top: 12.h, left: 16.w, right: 16.w, bottom: 21.h),
top: 12.h,
left: 16.w,
right: 16.w,
bottom: 21.h),
child: Text(
S.of(context).querenchongzhi,
style: TextStyle(
@ -410,6 +423,334 @@ class _MineShopRecharge extends State<MineShopRecharge> {
return 0xFF32A060;
}
///
Widget skeletonScreen() {
return Container(
child: Column(
children: [
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
borderRadius: new BorderRadius.only(
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
),
color: Color(0XFFD8D8D8),
),
height: 62.h,
),
Container(
decoration: BoxDecoration(
borderRadius: new BorderRadius.only(
bottomRight: Radius.circular(6),
topRight: Radius.circular(6),
),
color: Colors.white,
),
padding: EdgeInsets.all(12.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 68.w,
height: 17.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 120.w,
height: 17.h,
),
),
],
),
SizedBox(
height: 4.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 99.w,
height: 34.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 48.w,
height: 17.h,
),
),
SizedBox(
width: 2,
),
Image.asset(
"assets/image/icon_right_z.webp",
width: 16,
height: 16,
color: Color(0xFF262626),
)
],
),
],
),
),
],
),
Expanded(
child: ListView.builder(
itemCount: 4,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return Container(
width: double.infinity,
height: 69.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.white),
margin: EdgeInsets.only(bottom: 14.h, left: 14.w, right: 14.w),
padding: EdgeInsets.only(left: 16),
child: Flex(
direction: Axis.horizontal,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 20.w,
height: 15.h,
),
),
SizedBox(
width: 10.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 50.w,
height: 25.h,
),
),
],
),
Container(
width: 1.w,
height: 37.h,
color: Color(0xFF979797),
margin: EdgeInsets.only(right: 16.w, left: 12),
),
Expanded(
flex: 2,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 50.w,
height: 17.h,
),
),
SizedBox(
width: 10.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 48.w,
height: 25.h,
),
),
],
),
SizedBox(
height: 4.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 50.w,
height: 17.h,
),
),
Icon(
Icons.chevron_right,
size: 20,
color: Color(0xFF868686),
),
],
)
],
))
],
));
},
)),
Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(bottom: 16.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 64.w,
height: 21.h,
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 20.h,
height: 20.h,
),
),
Padding(
padding: EdgeInsets.only(left: 8.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 51.w,
height: 17.h,
),
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(100),
),
width: 15.h,
height: 15.h,
),
),
],
),
SizedBox(height: 10.h),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 20.h,
height: 20.h,
),
),
Padding(
padding: EdgeInsets.only(left: 8.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 51.w,
height: 17.h,
),
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(100),
),
width: 15.h,
height: 15.h,
),
),
],
),
],
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
height: 56.h,
width: double.infinity,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(27),
),
margin: EdgeInsets.only(
top: 12.h, left: 16.w, right: 16.w, bottom: 21.h),
),
)
],
));
}
///
Widget shopRechargeCard() {
return GestureDetector(
@ -617,9 +958,7 @@ class _MineShopRecharge extends State<MineShopRecharge> {
),
TextSpan(
text:
"${((memberRechargeList?.limitNum ?? 0) != 0 && ((memberRechargeList?.limitNum ?? 0) - (memberRechargeList?.useNum ?? 0) <= 0)) ?
(AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)) :
(AppUtils.calculateDouble((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) + (double.tryParse(memberRechargeList.giftdMoney) ?? 0) + ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) - ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) * (discount / 100)))))}",
"${((memberRechargeList?.limitNum ?? 0) != 0 && ((memberRechargeList?.limitNum ?? 0) - (memberRechargeList?.useNum ?? 0) <= 0)) ? (AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)) : (AppUtils.calculateDouble((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) + (double.tryParse(memberRechargeList.giftdMoney) ?? 0) + ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) - ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) * (discount / 100)))))}",
style: TextStyle(
fontSize: 18.sp,
fontFamily: 'JDZhengHT',
@ -677,7 +1016,7 @@ class _MineShopRecharge extends State<MineShopRecharge> {
checkIndex != index
? "assets/image/icon_radio_unselected.webp"
: "assets/image/icon_radio_selected.webp",
width: 15.w,
width: 15.h,
height: 15.h,
),
);

232
lib/order/exchange_history_page.dart

@ -19,6 +19,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
class ExchangeHistoryPage extends StatefulWidget {
@override
@ -130,6 +131,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
RefreshController(initialRefresh: false);
int pageNum = 1;
List<ExchangeOrder> orders = [];
int networkStatus = 0;
@override
void initState() {
@ -159,6 +161,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
}
BaseData<PageInfo<ExchangeOrder>> baseData =
await apiService.creditOrderList(map).catchError((error) {
networkStatus = -1;
_refreshController.loadFailed();
_refreshController.refreshFailed();
});
@ -174,6 +177,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
} else {
pageNum += 1;
}
networkStatus = 1;
} else {
_refreshController.refreshFailed();
_refreshController.loadFailed();
@ -205,7 +209,16 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
onLoading: () {
queryHistory(isLoading: false);
},
child: orders == null || orders.length == 0
child: networkStatus == 0
? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return buildOrderSm();
},
)
: (orders == null || orders.length == 0
? NoDataView(
src: "assets/image/ding_dan.webp",
isShowBtn: false,
@ -218,7 +231,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
itemBuilder: (context, position) {
return buildOrder(orders[position]);
},
),
)),
);
}
@ -571,6 +584,221 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList>
);
}
Widget buildOrderSm() {
return Container(
margin: EdgeInsets.fromLTRB(16.w, 8.h, 16.w, 8.h),
padding: EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
]),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 153.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 44.w,
height: 20.h,
),
)
],
),
SizedBox(
height: 16.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 50.w,
height: 17.h,
),
),
SizedBox(
width: 9.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 225.w,
height: 17.h,
),
)
],
),
SizedBox(
height: 10.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 50.w,
height: 17.h,
),
),
SizedBox(
width: 10.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 164.w,
height: 17.h,
),
)
],
),
SizedBox(
height: 16.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 66.h,
height: 66.h,
),
),
SizedBox(
width: 12.w,
),
Expanded(
child: Container(
height: 66.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 44.w,
height: 20.h,
),
),
SizedBox(
height: 5.h,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 213.w,
height: 20.h,
),
),
],
),
),
flex: 1,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 17.w,
height: 20.h,
),
)
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 91.w,
height: 20.h,
),
),
],
),
SizedBox(
height: 12.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: 135.w,
height: 17.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(10),
),
width:72.w,
height: 25.h,
),
)
],
)
],
),
);
}
receive2Card(id) async {
BaseData baseData = await apiService.creditOrderReceive(id);
if (baseData != null && baseData.isSuccess) {

5
lib/order/order_history_page.dart

@ -350,10 +350,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: orderItemSm(),
);
return orderItemSm();
},
) : ((orderInfos != null && orderInfos.length > 0)
? ListView.builder(

Loading…
Cancel
Save