From f8ebb86abd8a48661a8eb4c07b04a03d2006fbc7 Mon Sep 17 00:00:00 2001 From: fmk Date: Wed, 6 Sep 2023 00:29:57 +0800 Subject: [PATCH] =?UTF-8?q?ios=20=E7=99=BE=E5=BA=A6=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=9A=84=E6=98=BE=E7=A4=BA=EF=BC=9B=20?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96=E7=9A=84?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/union/location_map_page.dart | 2 +- lib/union/union_page.dart | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/union/location_map_page.dart b/lib/union/location_map_page.dart index 8becd164..52c6e762 100644 --- a/lib/union/location_map_page.dart +++ b/lib/union/location_map_page.dart @@ -507,7 +507,7 @@ class _LocationMap extends State with WidgetsBindingObserver { northeast: startLocation, southwest: endLocation), animated: true, insets: - EdgeInsets.only(top: 500.h, bottom: 200.h, left: 200.w, right: 200.w)); + EdgeInsets.only(top: Platform.isAndroid?500.h:150.h, bottom: Platform.isAndroid?200.h:50.h)); hours = needHours == 0 ? "" : "$needHours小时"; minutes = needMinutes == 0 ? "" : "$needMinutes分钟"; diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index d1cb3c36..204d3f89 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -72,7 +72,7 @@ class UnionPageState extends State } void permissionSettings() async { - if (await Permission.location.isGranted){ + if (_isShowLocalTips && await Permission.location.isGranted){ _isShowLocalTips = false; startLocation(); } @@ -111,7 +111,10 @@ class UnionPageState extends State queryIpInfo(); } - startLocation() async { + startLocation({bool showLoading = true}) async { + if(showLoading) + EasyLoading.show( + status: S.current.zhengzaijiazai, maskType: EasyLoadingMaskType.black); bool powerFlag = false; // bool finallyFlag = false; try { @@ -184,7 +187,7 @@ class UnionPageState extends State areaName = baseData.city.replaceAll("市", ""); } } finally { - startLocation(); + startLocation(showLoading: false); } }