From 30f3eb690fdfbab46de5695e490dbd4dc768667b Mon Sep 17 00:00:00 2001 From: fmk Date: Wed, 6 Sep 2023 21:24:04 +0800 Subject: [PATCH] ios --- lib/union/union_list.dart | 32 ++++++++++++++------------------ lib/union/union_page.dart | 8 ++++---- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 6e554855..111b6821 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -303,6 +303,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { children: []..addAll( itemServer(store != null ? store.businessService : "")), ), + if (storeList[position].productShow != null) SizedBox(height: store.businessService == "" ? 40.h : 23.h), if (storeList[position].productShow != null) Container( @@ -338,24 +339,19 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { var list = businessService.split(","); return list .map((e) => Container( - margin: EdgeInsets.only(right: 8.w), - child: Container( - decoration: BoxDecoration( - color: Color(0xFFF65720), - borderRadius: BorderRadius.circular(2), - ), - padding: EdgeInsets.symmetric(vertical:2.h,horizontal:3.w), - margin: EdgeInsets.only(right: 10.w), - child: Text( - "$e", - style: TextStyle( - color: Colors.white, - fontSize: 10.sp, - fontWeight: MyFontWeight.regular, - ), - ), - ), - )) + margin: EdgeInsets.only(right: 8.w), + child: RoundButton( + height: 17.h * AppUtils.textScale(context), + text: "$e", + backgroup: Color(0xFFF65720), + padding: EdgeInsets.only( + left: 4.w, + right: 4.w, + ), + fontSize: 10.sp, + textColor: Colors.white, + ), + )) .toList(); } diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 204d3f89..0a1de5a6 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -74,7 +74,7 @@ class UnionPageState extends State void permissionSettings() async { if (_isShowLocalTips && await Permission.location.isGranted){ _isShowLocalTips = false; - startLocation(); + getLocation(); } } @@ -111,7 +111,7 @@ class UnionPageState extends State queryIpInfo(); } - startLocation({bool showLoading = true}) async { + getLocation({bool showLoading = true}) async { if(showLoading) EasyLoading.show( status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); @@ -147,7 +147,7 @@ class UnionPageState extends State // finallyFlag = true; if (!powerFlag) { if (await Permission.locationWhenInUse.status.isGranted) { - startLocation(); + getLocation(); } else { _isShowLocalTips = true; loadFinish(showLoading: false); @@ -187,7 +187,7 @@ class UnionPageState extends State areaName = baseData.city.replaceAll("市", ""); } } finally { - startLocation(showLoading: false); + getLocation(showLoading: false); } }