|
|
@ -11,6 +11,7 @@ import 'package:huixiang/view_widget/request_permission.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
import 'package:permission_handler/permission_handler.dart'; |
|
|
|
import 'package:permission_handler/permission_handler.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
|
|
|
|
import 'package:shimmer/shimmer.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../view_widget/no_data_view.dart'; |
|
|
|
import '../view_widget/no_data_view.dart'; |
|
|
|
|
|
|
|
|
|
|
@ -49,13 +50,20 @@ class _UnionList extends State<UnionList> { |
|
|
|
header: MyHeader(), |
|
|
|
header: MyHeader(), |
|
|
|
onRefresh: widget.onRefresh, |
|
|
|
onRefresh: widget.onRefresh, |
|
|
|
child: (widget.storeList == null || widget.storeList.length == 0) |
|
|
|
child: (widget.storeList == null || widget.storeList.length == 0) |
|
|
|
? NoDataView( |
|
|
|
? ListView.builder( |
|
|
|
src:"assets/image/di_zhi.webp", |
|
|
|
itemCount:5, |
|
|
|
isShowBtn: false, |
|
|
|
padding: EdgeInsets.only( |
|
|
|
text: "暂无店铺列表~", |
|
|
|
top: 8.h, |
|
|
|
fontSize: 16.sp, |
|
|
|
bottom: 100.h, /* + (375.h - 88.h) + 4.h*/ |
|
|
|
margin: EdgeInsets.only(top: 120.h), |
|
|
|
), |
|
|
|
):ListView.builder( |
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
|
|
|
return InkWell( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child:sm(), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}):ListView.builder( |
|
|
|
itemCount:widget.storeList == null ? 0 : widget.storeList.length, |
|
|
|
itemCount:widget.storeList == null ? 0 : widget.storeList.length, |
|
|
|
padding: EdgeInsets.only( |
|
|
|
padding: EdgeInsets.only( |
|
|
|
top: 8.h, |
|
|
|
top: 8.h, |
|
|
@ -93,7 +101,8 @@ class _UnionList extends State<UnionList> { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: buildStoreItem(widget.storeList[position], position), |
|
|
|
child: |
|
|
|
|
|
|
|
buildStoreItem(widget.storeList[position], position), |
|
|
|
); |
|
|
|
); |
|
|
|
})), |
|
|
|
})), |
|
|
|
) |
|
|
|
) |
|
|
@ -101,6 +110,57 @@ class _UnionList extends State<UnionList> { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget sm(){ |
|
|
|
|
|
|
|
return Container( |
|
|
|
|
|
|
|
margin:EdgeInsets.symmetric(horizontal: 14.w,vertical: 8.h), |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(6), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
height: 223.h, |
|
|
|
|
|
|
|
child:Column( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
height: 140.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Padding(padding: EdgeInsets.only(left: 6.w,bottom: 5.h,top: 12.h), |
|
|
|
|
|
|
|
child: Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
width: 108.w, |
|
|
|
|
|
|
|
height: 20.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
),),Padding(padding: EdgeInsets.only(left: 6.w,), |
|
|
|
|
|
|
|
child: Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
width: 260.w, |
|
|
|
|
|
|
|
height: 20.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
),), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Widget buildSearchItem() { |
|
|
|
Widget buildSearchItem() { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
height: 36.h, |
|
|
|
height: 36.h, |
|
|
|