Browse Source

商品列表更改;

列表部分新增占位符框架;
wr_2023_business
wurong 1 year ago
parent
commit
c90120432b
  1. 138
      lib/business_system/goods/goods_search_page.dart
  2. 128
      lib/business_system/goods/off_shelf/off_shelf_page.dart
  3. 81
      lib/business_system/goods/on_sale/goods_assort.dart
  4. 278
      lib/business_system/goods/on_sale/on_sale_page.dart
  5. 98
      lib/business_system/home/flow_page.dart
  6. 57
      lib/business_system/home/overview/trade_goods.dart
  7. 409
      lib/business_system/order/business_order_detail.dart
  8. 274
      lib/business_system/order/order_list.dart
  9. 1
      lib/store/store_order.dart

138
lib/business_system/goods/goods_search_page.dart

@ -7,6 +7,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart';
import '../../retrofit/data/base_data.dart';
@ -46,6 +47,7 @@ class _GoodsSearchPage extends State<GoodsSearchPage>
BusinessApiService businessService;
List<AdminProductVoList> adminProductVoList = [];
int goodsIndex = 0;
bool _shimmer =true;
@override
void didChangeMetrics() {
@ -90,6 +92,7 @@ class _GoodsSearchPage extends State<GoodsSearchPage>
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryGoodsList();
_shimmer = false;
EasyLoading.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted();
@ -243,7 +246,17 @@ class _GoodsSearchPage extends State<GoodsSearchPage>
_pageIndex++;
_onRefresh(isShowLoad: false);
},
child: (adminProductVoList == null ||
child: (_shimmer)?ListView.builder(
padding: EdgeInsets.zero,
itemCount: 10,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return searchGoodsItemSm();
},
):
((adminProductVoList == null ||
adminProductVoList.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
@ -270,7 +283,7 @@ class _GoodsSearchPage extends State<GoodsSearchPage>
);
},
),
),
)),
),
),
)
@ -411,4 +424,125 @@ class _GoodsSearchPage extends State<GoodsSearchPage>
),
);
}
Widget searchGoodsItemSm() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
margin: EdgeInsets.only(bottom: 12.h, left: 16.w, right: 16.w),
padding:
EdgeInsets.only(left: 12.w, top: 12.h, bottom: 12.h, right: 24.w),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(4),
),
width: 70.h,
height: 70.h,
),
),
SizedBox(
width: 12.w,
),
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,
),
),
),
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,
),
),
],
),
SizedBox(height: 7.h,),
Row(
children: [
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,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 24.w,
height: 18.h,
),
),
],
)
],
)),
],
),
);
}
}

128
lib/business_system/goods/off_shelf/off_shelf_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
@ -40,6 +41,7 @@ class _OffShelfPage extends State<OffShelfPage> {
BusinessApiService businessService;
List<AdminProductVoList> adminProductVoList = [];
List<dynamic> productIds = [];
bool _shimmer = true;
@override
void dispose() {
@ -59,6 +61,7 @@ class _OffShelfPage extends State<OffShelfPage> {
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryGoodsList();
_shimmer = false;
EasyLoading.dismiss();
if (!mounted) return;
if (_refreshController.isRefresh) _refreshController.refreshCompleted();
@ -222,7 +225,18 @@ class _OffShelfPage extends State<OffShelfPage> {
},
child: Container(
color: Colors.white,
child: (adminProductVoList == null ||
child: (_shimmer)?ListView.builder(
itemCount:10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: shelfGoodsItemSm(),
);
},
):
((adminProductVoList == null ||
adminProductVoList.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
@ -242,7 +256,7 @@ class _OffShelfPage extends State<OffShelfPage> {
adminProductVoList[position]),
);
},
),
))
)),
),
),
@ -551,4 +565,114 @@ class _OffShelfPage extends State<OffShelfPage> {
),
);
}
Widget shelfGoodsItemSm() {
return Container(
margin: EdgeInsets.only(bottom: 22.h),
padding: EdgeInsets.only(
left: 5.w,
),
child: Row(
children: [
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(
width: 18.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(4),
),
width: 70.h,
height: 70.h,
),
),
SizedBox(
width: 12.w,
),
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: 112.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,
),
),
],
),
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,
),
),
],
)),
],
),
);
}
}

81
lib/business_system/goods/on_sale/goods_assort.dart

@ -6,6 +6,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
@ -35,6 +36,7 @@ class _GoodsAssort extends State<GoodsAssort> {
final RefreshController refreshController = RefreshController();
BusinessApiService businessService;
ProductGroupList productGroupList;
bool _shimmer = true;
@override
void initState() {
@ -48,6 +50,7 @@ class _GoodsAssort extends State<GoodsAssort> {
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryProductGroupList();
_shimmer = false;
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted)
@ -138,7 +141,19 @@ class _GoodsAssort extends State<GoodsAssort> {
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: (productGroupList == null ||
child: (_shimmer)?ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: assortItemSm(),
);
},
):
((productGroupList == null ||
productGroupList.records.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
@ -158,7 +173,7 @@ class _GoodsAssort extends State<GoodsAssort> {
child: assortItem(productGroupList.records[position]),
);
},
),
)),
),
),
)),
@ -284,6 +299,68 @@ class _GoodsAssort extends State<GoodsAssort> {
);
}
Widget assortItemSm() {
return Container(
child: Column(
children: [
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 112.w,
height: 20.h,
),
),
Spacer(),
Padding(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: 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,
),
),
),
Padding(
padding: EdgeInsets.only(right: 16.w, left: 17.w),
child: 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,
),
),
),
],
),
Container(
margin: EdgeInsets.symmetric(vertical: 16.h),
color: Color(0xFFEBEBEB),
height: 1.h,
width: double.infinity,
)
],
),
);
}
///
showDelGroupDialog(id) {
showDialog(

278
lib/business_system/goods/on_sale/on_sale_page.dart

@ -8,6 +8,7 @@ import 'package:huixiang/view_widget/my_footer.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';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
@ -34,6 +35,7 @@ class OnSalePage extends StatefulWidget {
class _OnSalePage extends State<OnSalePage> {
final RefreshController _refreshController = RefreshController();
final RefreshController refreshController = RefreshController();
ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics();
final ScrollController controller = ScrollController();
BusinessApiService businessService;
@ -42,11 +44,13 @@ class _OnSalePage extends State<OnSalePage> {
int _loadCount = 0;
int _pageIndex = 1;
int groupIndex = -1;
bool _shimmer = true;
@override
void dispose() {
super.dispose();
_refreshController.dispose();
refreshController.dispose();
}
@override
@ -67,7 +71,9 @@ class _OnSalePage extends State<OnSalePage> {
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.storeId);
queryProductGroupList();
queryGoodsList("", isSing: false);
queryGoodsList(
groupIndex != -1 ? productGroupList.records[groupIndex].id : "",
isSing: false);
});
}
@ -75,8 +81,9 @@ class _OnSalePage extends State<OnSalePage> {
_loadCount += 1;
if (_loadCount == 2) {
_loadCount = 0;
_shimmer = false;
EasyLoading.dismiss();
if (_refreshController.isRefresh) _refreshController.refreshCompleted();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (!mounted) setState(() {});
}
}
@ -93,8 +100,8 @@ class _OnSalePage extends State<OnSalePage> {
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
_refreshController.refreshFailed();
_refreshController.loadFailed();
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
@ -125,18 +132,23 @@ class _OnSalePage extends State<OnSalePage> {
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
_refreshController.refreshFailed();
_refreshController.loadFailed();
// _refreshController.refreshFailed();
// _refreshController.loadFailed();
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
adminProductVoList.addAll(baseData?.data?.adminProductVOList ?? []);
widget.total(baseData.data.total.toString());
if ((baseData?.data?.adminProductVOList ?? []).isEmpty ||
adminProductVoList.length == baseData.data.total)
_refreshController.loadNoData();
else
_refreshController.loadComplete();
adminProductVoList.length == baseData.data.total) {
// _refreshController.loadNoData();
refreshController.loadNoData();
} else {
// _refreshController.loadComplete();
refreshController.loadComplete();
}
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
@ -151,7 +163,7 @@ class _OnSalePage extends State<OnSalePage> {
}
///
queryGoodsUpdate() async {
queryGoodsUpdate({isSing = true}) async {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
@ -164,7 +176,11 @@ class _OnSalePage extends State<OnSalePage> {
"sell": false,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
await queryGoodsList(groupIndex == -1?"":productGroupList?.records[groupIndex]?.id ?? "");
_pageIndex = 1;
adminProductVoList.clear();
await queryGoodsList(groupIndex == -1
? ""
: productGroupList?.records[groupIndex]?.id ?? "");
SmartDialog.showToast("商品下架成功", alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
@ -179,9 +195,6 @@ class _OnSalePage extends State<OnSalePage> {
alignment: Alignment.bottomCenter,
children: [
Column(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
goodsSearch(),
Container(
@ -189,19 +202,46 @@ class _OnSalePage extends State<OnSalePage> {
height: 1.h,
width: double.infinity,
),
],
),
Expanded(
child: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(
color: Color(0xFF30415B),
),
physics: BouncingScrollPhysics(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_pageIndex = 1;
adminProductVoList.clear();
_onRefresh(isShowLoad: false);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 100.w,
child: ListView.builder(
itemCount: productGroupList?.records?.length ?? 0,
physics: BouncingScrollPhysics(),
child: (_shimmer)
? ListView.builder(
itemCount: 10,
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return leftItemSm();
},
)
: ListView.builder(
itemCount:
productGroupList?.records?.length ??
0,
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
@ -212,22 +252,28 @@ class _OnSalePage extends State<OnSalePage> {
_pageIndex = 1;
adminProductVoList.clear();
queryGoodsList(
productGroupList?.records[position].id,
productGroupList
?.records[position].id,
isSing: false);
});
},
child: leftItem(
productGroupList.records[position], position),
productGroupList
.records[position],
position),
);
},
),
),
Container(
width: MediaQuery.of(context).size.width - 100.w,
width:
MediaQuery.of(context).size.width - 100.w,
child: SmartRefresher(
controller: _refreshController,
enablePullDown: false,
enablePullUp: adminProductVoList.length != 0 ?true:false,
enablePullUp: adminProductVoList.length != 0
? true
: false,
header: MyHeader(
color: Color(0xFF30415B),
),
@ -239,32 +285,55 @@ class _OnSalePage extends State<OnSalePage> {
),
onLoading: () {
_pageIndex++;
queryGoodsList(groupIndex == -1 ? "":productGroupList?.records[groupIndex].id);
queryGoodsList(groupIndex == -1
? ""
: productGroupList
?.records[groupIndex].id);
},
child: Container(
color: Colors.white,
child: (adminProductVoList == null || adminProductVoList.length == 0)
child: (_shimmer)
? ListView.builder(
itemCount: 10,
physics:
BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder:
(context, position) {
return rightGoodsSm();
},
)
: ((adminProductVoList == null ||
adminProductVoList.length ==
0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
src:
"assets/image/bs_no data_logo.webp",
isShowBtn: false,
text: "该分组暂无添加商品",
fontSize: 16.sp,
margin: EdgeInsets.all(20.h),
margin:
EdgeInsets.all(20.h),
)
: ListView.builder(
itemCount: adminProductVoList?.length ?? 0,
itemCount:
adminProductVoList
?.length ??
0,
controller: controller,
physics: BouncingScrollPhysics(),
physics:
BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
itemBuilder:
(context, position) {
return rightGoodsItem(
adminProductVoList[position]);
adminProductVoList[
position]);
},
),
)),
)))),
),
],
)
))
// SmartRefresher(
// controller: _refreshController,
// enablePullDown: true,
@ -285,7 +354,7 @@ class _OnSalePage extends State<OnSalePage> {
// },
// onLoading: () {
// _pageIndex++;
// queryGoodsList();
// queryGoodsList(groupIndex == -1 ? "" : productGroupList.records[groupIndex].id);
// },
// child: Container(
// color: Colors.white,
@ -303,7 +372,7 @@ class _OnSalePage extends State<OnSalePage> {
// return GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: () {},
// child: leftItem(productGroupList.records[position]),
// child: leftItem(productGroupList.records[position],position),
// );
// },
// ),
@ -511,9 +580,12 @@ class _OnSalePage extends State<OnSalePage> {
records?.groupName ?? "",
textAlign: TextAlign.center,
style: TextStyle(
color: groupIndex == index ? Color(0xFF30415B):Color(0xFF626264),
color:
groupIndex == index ? Color(0xFF30415B) : Color(0xFF626264),
fontSize: 12.sp,
fontWeight: groupIndex == index ? MyFontWeight.semi_bold : MyFontWeight.regular,
fontWeight: groupIndex == index
? MyFontWeight.semi_bold
: MyFontWeight.regular,
),
)),
],
@ -637,4 +709,132 @@ class _OnSalePage extends State<OnSalePage> {
),
);
}
Widget leftItemSm() {
return Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 48.w,
height: 30.h,
),
),
);
}
Widget rightGoodsSm() {
return Container(
margin: EdgeInsets.only(bottom: 21.h, left: 16.w, right: 16.w, top: 10.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(4),
),
width: 70.h,
height: 70.h,
),
),
SizedBox(
width: 12.w,
),
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,
),
),
),
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,
),
),
],
),
SizedBox(
height: 7.h,
),
Row(
children: [
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,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 24.w,
height: 18.h,
),
),
],
)
],
)),
],
),
);
}
}

98
lib/business_system/home/flow_page.dart

@ -8,6 +8,7 @@ import 'package:intl/intl.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';
import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart';
@ -38,7 +39,7 @@ class _FlowPage extends State<FlowPage> {
List<DayFlowList> dayFlowList = [];
int _loadCount = 0;
String _datetime;
bool _shimmer = true;
@override
void initState() {
@ -56,7 +57,11 @@ class _FlowPage extends State<FlowPage> {
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: storeId);
queryDayFlow(_datetime == null ? DateFormat("yyyy-MM-dd").format(DateTime.now()):(_datetime+"-01"), "0",
queryDayFlow(
_datetime == null
? DateFormat("yyyy-MM-dd").format(DateTime.now())
: (_datetime + "-01"),
"0",
isSing: false);
});
}
@ -65,6 +70,7 @@ class _FlowPage extends State<FlowPage> {
_loadCount += 1;
if (_loadCount == 1) {
_loadCount = 0;
_shimmer = false;
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
if (mounted) setState(() {});
@ -142,7 +148,9 @@ class _FlowPage extends State<FlowPage> {
child: Row(
children: [
Text(
_datetime == null ? DateFormat("yyyy年MM月").format(DateTime.now()) : "${_datetime.replaceAll("-", "")}",
_datetime == null
? DateFormat("yyyy年MM月").format(DateTime.now())
: "${_datetime.replaceAll("-", "")}",
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
@ -160,6 +168,7 @@ class _FlowPage extends State<FlowPage> {
SizedBox(
height: 16.h,
),
if(!_shimmer)
(dayFlowList == null || dayFlowList.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
@ -180,6 +189,17 @@ class _FlowPage extends State<FlowPage> {
child: billItem(dayFlowList[position]),
);
},
),
if(_shimmer)
ListView.builder(
padding: EdgeInsets.zero,
itemCount: 10,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return billItemSm();
},
)
],
),
@ -269,6 +289,78 @@ class _FlowPage extends State<FlowPage> {
);
}
Widget billItemSm() {
return Container(
margin: EdgeInsets.only(bottom: 12.h),
padding: EdgeInsets.all(12),
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 50.w,
height: 20.h,
),
),
Spacer(),
Icon(
Icons.keyboard_arrow_down,
color: Color(0xFF0D0D0D),
size: 24,
),
],
),
Padding(
padding: EdgeInsets.only(
top: 16.h,
),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 114.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 38.w,
height: 20.h,
),
),
],
))
],
),
);
}
///
Widget billIDetailsItem(DayFlowList detailList) {
return Container(

57
lib/business_system/home/overview/trade_goods.dart

@ -9,6 +9,7 @@ import 'package:intl/intl.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';
import '../../../generated/l10n.dart';
import '../../../retrofit/business_api.dart';
@ -49,6 +50,7 @@ class _TradeGoods extends State<TradeGoods> {
BusinessApiService businessService;
List<SingleSalesList> singleSalesList = [];
List<GoodsTypeSalesList> goodsTypeSalesList = [];
bool _shimmer = true;
@override
void dispose() {
@ -173,6 +175,7 @@ class _TradeGoods extends State<TradeGoods> {
_loadCount += 1;
if (_loadCount == 2) {
_loadCount = 0;
_shimmer = false;
EasyLoading.dismiss();
if (_refreshController.isRefresh) _refreshController.refreshCompleted();
if (mounted) setState(() {});
@ -762,6 +765,7 @@ class _TradeGoods extends State<TradeGoods> {
],
),
),
if(!_shimmer)
(goodsTypeSalesList == null || goodsTypeSalesList.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
@ -786,6 +790,17 @@ class _TradeGoods extends State<TradeGoods> {
);
},
),
),
if(_shimmer)
ListView.builder(
padding: EdgeInsets.zero,
itemCount: 9,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return goodsTypeItemSm(position);
},
)
],
),
@ -823,6 +838,48 @@ class _TradeGoods extends State<TradeGoods> {
);
}
Widget goodsTypeItemSm(index) {
return Container(
margin: EdgeInsets.only(bottom: 12.h),
padding: EdgeInsets.only(top: 8.h, left: 11.w, right: 24.w, bottom: 7.h),
width: double.infinity,
decoration: BoxDecoration(
color: index % 2 == 0 ? Color(0xFFF9FAF8) : Colors.white,
borderRadius: BorderRadius.circular(6),
),
child:
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 50.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 50.w,
height: 20.h,
),
),
],
),
);
}
///
Widget singleSalesStatement() {
return Container(

409
lib/business_system/order/business_order_detail.dart

@ -8,6 +8,7 @@ import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/business_api.dart';
@ -32,6 +33,7 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
final RefreshController refreshController = RefreshController();
BusinessApiService businessService;
BusinessOrderDetailInfo orderDetailInfo;
bool _shimmer = true;
@override
void initState() {
@ -69,6 +71,7 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
} finally {
_shimmer = false;
EasyLoading.dismiss();
if (refreshController.isRefresh) refreshController.refreshCompleted();
setState(() {});
@ -106,7 +109,7 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
child: Container(
margin: EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w),
child: Column(
children: [goodsInfo(), orderInfo()],
children: [goodsInfo(), (_shimmer)?orderInfoSm():orderInfo()],
),
),
),
@ -162,6 +165,16 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
SizedBox(
height: 12.h,
),
(_shimmer)?ListView.builder(
padding: EdgeInsets.zero,
itemCount: 3,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return goodsInfoSm();
},
):
ListView.builder(
padding: EdgeInsets.zero,
itemCount: orderDetailInfo?.orderProductDTOList?.length ?? 0,
@ -169,12 +182,10 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: goodsInfoItem(orderDetailInfo.orderProductDTOList[position]),
);
return goodsInfoItem(orderDetailInfo.orderProductDTOList[position]);
},
)
],
),
);
@ -337,6 +348,394 @@ class _BusinessOrderDetail extends State<BusinessOrderDetail> {
);
}
Widget goodsInfoSm(){
return Container(
margin: EdgeInsets.only(bottom: 12.h),
height: 77.h,
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(4),
),
width: 77.h,
height: 77.h,
),
),
SizedBox(
width: 12.w,
),
Expanded(child:Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 117.w,
height: 20.h,
),
),
Spacer(),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 15.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 29.w,
height: 20.h,
),
),
],
)
],
))
],
),
);
}
Widget orderInfoSm(){
return Container(
padding: EdgeInsets.all(12),
margin: EdgeInsets.only(top: 12.h,bottom:30.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(
2,
),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E).withAlpha(12),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
children: [
Row(
children: [
Container(
width: 2.w,
height: 16.h,
color: Color(0xFF30415B),
margin: EdgeInsets.only(right: 4.w),
),
Text(
"订单信息",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.semi_bold),
)
],
),
SizedBox(
height: 12.h,
),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 171.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 147.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
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,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 70.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 34.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 84.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 25.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 38.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 55.w,
height: 20.h,
),
),
],
)),
Padding(padding:EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 147.w,
height: 20.h,
),
),
],
)),
],
),
);
}
Widget orderInfoItem(leftText, rightText) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),

274
lib/business_system/order/order_list.dart

@ -8,6 +8,7 @@ import 'package:huixiang/view_widget/my_footer.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';
import '../../../utils/font_weight.dart';
import '../../generated/l10n.dart';
@ -40,6 +41,7 @@ class _OrderList extends State<OrderList> {
BusinessApiService businessService;
List<AdminOrderDtoList> adminOrderDTOList = [];
int _pageIndex = 1;
bool _shimmer = true;
@override
void dispose() {
@ -59,6 +61,7 @@ class _OrderList extends State<OrderList> {
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryOrderList();
_shimmer = false;
EasyLoading.dismiss();
if (!mounted) return;
if (_refreshController.isRefresh) _refreshController.refreshCompleted();
@ -68,7 +71,6 @@ class _OrderList extends State<OrderList> {
///
queryOrderList() async {
if (businessService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
@ -139,7 +141,16 @@ class _OrderList extends State<OrderList> {
_pageIndex++;
_onRefresh(isShowLoad: false);
},
child: (adminOrderDTOList == null || adminOrderDTOList.length == 0)
child: (_shimmer) ? ListView.builder(
padding: EdgeInsets.zero,
itemCount: 10,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return orderItemSm();
},
): ((adminOrderDTOList == null || adminOrderDTOList.length == 0)
? NoDataView(
src: "assets/image/bs_no data_logo.webp",
isShowBtn: false,
@ -158,14 +169,18 @@ class _OrderList extends State<OrderList> {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context)
.pushNamed('/router/business_order_detail',arguments: {"id":adminOrderDTOList[position].id,"storeId":widget.storeId});
Navigator.of(context).pushNamed(
'/router/business_order_detail',
arguments: {
"id": adminOrderDTOList[position].id,
"storeId": widget.storeId
});
},
child: orderItem(adminOrderDTOList[position]),
);
},
),
),
)),
);
}
@ -404,4 +419,253 @@ class _OrderList extends State<OrderList> {
),
);
}
Widget orderItemSm() {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h),
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 12.h, left: 12.w, right: 12.w),
child: Row(
children: [
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(
width: 3.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 84.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
),
],
),
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFF4F6F7),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 12.w),
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 17.h, bottom: 13.h),
child: ListView.builder(
padding: EdgeInsets.zero,
itemCount: 5,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: orderGoodsSm(),
);
},
),
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 52.w,
height: 20.h,
),
),
Padding(
padding: EdgeInsets.only(left: 14.w),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 118.w,
height: 20.h,
),
),
),
],
),
SizedBox(
height: 4.h,
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 52.w,
height: 20.h,
),
),
SizedBox(
width: 14.w,
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 73.w,
height: 20.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(left: 4.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 45.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 36.w,
height: 20.h,
),
),
],
),
SizedBox(
height: 20.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 20.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 76.w,
height: 27.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 76.w,
height: 27.h,
),
),
],
)
],
),
),
],
),
);
}
Widget orderGoodsSm() {
return Container(
margin: EdgeInsets.only(bottom: 13.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 84.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 17.w,
height: 20.h,
),
),
],
),
);
}
}

1
lib/store/store_order.dart

@ -1054,7 +1054,6 @@ class _Title extends State<Title> {
@override
void initState() {
super.initState();
widget.controller.addListener(() {
double maxScrollExtent = widget.controller.position.maxScrollExtent;
double alphaHeight = (kToolbarHeight) / 2;

Loading…
Cancel
Save