fix: 修复android第一次进入锁地址定位页面定位异常需要退出重新进入才能正常那个获取定位信息的问题
This commit is contained in:
parent
044990cad5
commit
ef8aa255e2
@ -10,6 +10,8 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<!--允许访问网络,必选权限-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<!--申请调用A-GPS模块-->
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<!--允许获取精确位置,精准定位必选-->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!--允许获取粗略位置,粗略定位必选-->
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
|
||||
|
||||
import 'package:amap_flutter_location/amap_flutter_location.dart';
|
||||
import 'package:amap_flutter_location/amap_location_option.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
|
||||
import 'lockAddressGaoDe_state.dart';
|
||||
@ -10,46 +5,6 @@ import 'lockAddressGaoDe_state.dart';
|
||||
class LockAddressGaoDeLogic extends BaseGetXController{
|
||||
LockAddressGaoDeState state = LockAddressGaoDeState();
|
||||
|
||||
// Future<void> requestPermission() async {
|
||||
// final status = await Permission.location.request();
|
||||
// AppLog.log("Permission.location.request()=status:$status");
|
||||
// // state.permissionStatus = status;
|
||||
// switch (status) {
|
||||
// case PermissionStatus.denied:
|
||||
// AppLog.log("拒绝");
|
||||
// break;
|
||||
// case PermissionStatus.granted:
|
||||
// requestLocation();
|
||||
// break;
|
||||
// case PermissionStatus.limited:
|
||||
// AppLog.log("限制");
|
||||
// break;
|
||||
// default:
|
||||
// AppLog.log("其他状态");
|
||||
// requestLocation();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Future<void> requestLocation() async {
|
||||
// state.location = AMapFlutterLocation()
|
||||
// ..setLocationOption(AMapLocationOption())
|
||||
// ..onLocationChanged().listen((event) {
|
||||
// AppLog.log("listenLocationChanged$event");
|
||||
// state.latitude.value = double.parse(event['latitude'] as String);
|
||||
// state.longitude.value = double.parse(event['longitude'] as String);
|
||||
// if (state.latitude.value != 0 && state.longitude.value != 0) {
|
||||
// // widget.callback(event);
|
||||
// state.addressInfo.value = event;
|
||||
// // currentLocation = CameraPosition(
|
||||
// // target: LatLng(latitude, longitude),
|
||||
// // zoom: 10,
|
||||
// // );
|
||||
// }
|
||||
// })
|
||||
// ..startLocation();
|
||||
// }
|
||||
|
||||
void pushAddAction(){
|
||||
|
||||
}
|
||||
@ -63,12 +18,6 @@ class LockAddressGaoDeLogic extends BaseGetXController{
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
|
||||
// AMapFlutterLocation.updatePrivacyAgree(true);
|
||||
// AMapFlutterLocation.updatePrivacyShow(true, true);
|
||||
// AMapFlutterLocation.setApiKey("11d49b3f4fc09c04a02bbb7500925ba2", "883a3355d2d77c2fdc2667030dc97ffe");
|
||||
//
|
||||
// requestPermission();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@ -14,9 +14,7 @@ import 'package:star_lock/widget/permission/permission_dialog.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../flavors.dart';
|
||||
import '../../../../tools/appRouteObserver.dart';
|
||||
import '../../../../tools/titleAppBar.dart';
|
||||
import 'lockAddressGaoDe_logic.dart';
|
||||
|
||||
@ -30,68 +28,139 @@ class LockAddressGaoDePage extends StatefulWidget {
|
||||
class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||
with RouteAware {
|
||||
final LockAddressGaoDeLogic logic = Get.put(LockAddressGaoDeLogic());
|
||||
final LockAddressGaoDeState state = Get
|
||||
.find<LockAddressGaoDeLogic>()
|
||||
.state;
|
||||
|
||||
// 高德地图
|
||||
static AMapApiKey amapApiKeys =
|
||||
AMapApiKey(iosKey: F.aMapKey.iosKey, androidKey: F.aMapKey.androidKey);
|
||||
|
||||
final LockAddressGaoDeState state = Get.find<LockAddressGaoDeLogic>().state;
|
||||
AMapController? mapController;
|
||||
AMapFlutterLocation location = AMapFlutterLocation();
|
||||
Map<String, Object>? _addressInfo;
|
||||
|
||||
PermissionStatus? permissionStatus;
|
||||
Map<String, Object>? addressInfo;
|
||||
late StreamSubscription<Map<String, Object>> _locationListener;
|
||||
|
||||
AMapFlutterLocation _amapLocationPlugin = AMapFlutterLocation();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
AMapFlutterLocation.updatePrivacyAgree(true);
|
||||
|
||||
/// 设置是否已经包含高德隐私政策并弹窗展示显示用户查看,如果未包含或者没有弹窗展示,高德定位SDK将不会工作
|
||||
///
|
||||
/// 高德SDK合规使用方案请参考官网地址:https://lbs.amap.com/news/sdkhgsy
|
||||
/// <b>必须保证在调用定位功能之前调用, 建议首次启动App时弹出《隐私政策》并取得用户同意</b>
|
||||
///
|
||||
/// 高德SDK合规使用方案请参考官网地址:https://lbs.amap.com/news/sdkhgsy
|
||||
///
|
||||
/// [hasContains] 隐私声明中是否包含高德隐私政策说明
|
||||
///
|
||||
/// [hasShow] 隐私权政策是否弹窗展示告知用户
|
||||
AMapFlutterLocation.updatePrivacyShow(true, true);
|
||||
|
||||
/// 设置是否已经取得用户同意,如果未取得用户同意,高德定位SDK将不会工作
|
||||
///
|
||||
/// 高德SDK合规使用方案请参考官网地址:https://lbs.amap.com/news/sdkhgsy
|
||||
///
|
||||
/// <b>必须保证在调用定位功能之前调用, 建议首次启动App时弹出《隐私政策》并取得用户同意</b>
|
||||
///
|
||||
/// [hasAgree] 隐私权政策是否已经取得用户同意
|
||||
AMapFlutterLocation.updatePrivacyAgree(true);
|
||||
AMapFlutterLocation.setApiKey(F.aMapKey.androidKey, F.aMapKey.iosKey);
|
||||
|
||||
/// 动态申请定位权限
|
||||
requestPermission();
|
||||
}
|
||||
|
||||
///设置Android和iOS的apiKey<br>
|
||||
///
|
||||
/// 定位Flutter插件提供了单独的设置ApiKey的接口,
|
||||
/// 使用接口的优先级高于通过Native配置ApiKey的优先级(通过Api接口配置后,通过Native配置文件设置的key将不生效),
|
||||
/// 使用时可根据实际情况决定使用哪种方式
|
||||
///
|
||||
///key的申请请参考高德开放平台官网说明<br>
|
||||
///
|
||||
///Android: https://lbs.amap.com/api/android-location-sdk/guide/create-project/get-key
|
||||
///
|
||||
///iOS: https://lbs.amap.com/api/ios-location-sdk/guide/create-project/get-key
|
||||
// AMapFlutterLocation.setApiKey(
|
||||
// "anroid ApiKey", "ios ApiKey");
|
||||
|
||||
Future<void> requestPermission() async {
|
||||
final bool status = await PermissionDialog.request(Permission.location);
|
||||
///iOS 获取native精度类型
|
||||
if (Platform.isIOS) {
|
||||
_setLocationOption();
|
||||
requestIOSLocation();
|
||||
requestAccuracyAuthorization();
|
||||
}
|
||||
|
||||
if (!Platform.isIOS || status) {
|
||||
_setLocationOption();
|
||||
requestAndroidLocation();
|
||||
location.startLocation();
|
||||
}
|
||||
}
|
||||
///注册定位结果监听
|
||||
_locationListener = _amapLocationPlugin
|
||||
.onLocationChanged()
|
||||
.listen((Map<String, Object> result) {
|
||||
setState(() {
|
||||
_addressInfo = result;
|
||||
});
|
||||
});
|
||||
|
||||
Future<void> requestAndroidLocation() async {
|
||||
location.onLocationChanged().listen((Map<String, Object> event) {
|
||||
if (event.isNotEmpty) {
|
||||
setState(() {
|
||||
addressInfo = event;
|
||||
});
|
||||
location.stopLocation();
|
||||
}
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
_startLocation();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> requestIOSLocation() async {
|
||||
location.setLocationOption(AMapLocationOption());
|
||||
location.onLocationChanged().listen((Map<String, Object> event) {
|
||||
// AppLog.log("listenLocationChanged$event");
|
||||
// EasyLoading.dismiss();
|
||||
if (event.isNotEmpty) {
|
||||
setState(() {
|
||||
addressInfo = event;
|
||||
});
|
||||
// location.stopLocation();
|
||||
}
|
||||
});
|
||||
location.startLocation();
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
|
||||
///移除定位监听
|
||||
_locationListener.cancel();
|
||||
|
||||
///销毁定位
|
||||
_amapLocationPlugin.destroy();
|
||||
}
|
||||
|
||||
///设置定位参数
|
||||
void _setLocationOption() {
|
||||
AMapLocationOption locationOption = new AMapLocationOption();
|
||||
|
||||
///是否单次定位
|
||||
locationOption.onceLocation = false;
|
||||
|
||||
///是否需要返回逆地理信息
|
||||
locationOption.needAddress = true;
|
||||
|
||||
///逆地理信息的语言类型
|
||||
locationOption.geoLanguage = GeoLanguage.DEFAULT;
|
||||
|
||||
locationOption.desiredLocationAccuracyAuthorizationMode =
|
||||
AMapLocationAccuracyAuthorizationMode.ReduceAccuracy;
|
||||
|
||||
locationOption.fullAccuracyPurposeKey = "AMapLocationScene";
|
||||
|
||||
///设置Android端连续定位的定位间隔
|
||||
locationOption.locationInterval = 2000;
|
||||
|
||||
///设置Android端的定位模式<br>
|
||||
///可选值:<br>
|
||||
///<li>[AMapLocationMode.Battery_Saving]</li>
|
||||
///<li>[AMapLocationMode.Device_Sensors]</li>
|
||||
///<li>[AMapLocationMode.Hight_Accuracy]</li>
|
||||
locationOption.locationMode = AMapLocationMode.Hight_Accuracy;
|
||||
|
||||
///设置iOS端的定位最小更新距离<br>
|
||||
locationOption.distanceFilter = -1;
|
||||
|
||||
///设置iOS端期望的定位精度
|
||||
/// 可选值:<br>
|
||||
/// <li>[DesiredAccuracy.Best] 最高精度</li>
|
||||
/// <li>[DesiredAccuracy.BestForNavigation] 适用于导航场景的高精度 </li>
|
||||
/// <li>[DesiredAccuracy.NearestTenMeters] 10米 </li>
|
||||
/// <li>[DesiredAccuracy.Kilometer] 1000米</li>
|
||||
/// <li>[DesiredAccuracy.ThreeKilometers] 3000米</li>
|
||||
locationOption.desiredAccuracy = DesiredAccuracy.Best;
|
||||
|
||||
///设置iOS端是否允许系统暂停定位
|
||||
locationOption.pausesLocationUpdatesAutomatically = false;
|
||||
|
||||
///将定位参数设置给定位插件
|
||||
_amapLocationPlugin.setLocationOption(locationOption);
|
||||
}
|
||||
|
||||
///开始定位
|
||||
void _startLocation() {
|
||||
///开始定位之前设置定位参数
|
||||
_setLocationOption();
|
||||
_amapLocationPlugin.startLocation();
|
||||
}
|
||||
|
||||
@override
|
||||
@ -115,90 +184,93 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
child: (addressInfo != null && addressInfo!.containsKey('latitude'))
|
||||
child: (_addressInfo != null &&
|
||||
_addressInfo!.containsKey('latitude'))
|
||||
? Column(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 1.sw / 5 * 4,
|
||||
width: 1.sw,
|
||||
child: AMapWidget(
|
||||
apiKey: amapApiKeys,
|
||||
// 初始化地图中心
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: LatLng(
|
||||
double.parse(
|
||||
addressInfo!['latitude'].toString()),
|
||||
double.parse(
|
||||
addressInfo!['longitude'].toString())),
|
||||
zoom: 10.0,
|
||||
),
|
||||
//定位小蓝点
|
||||
myLocationStyleOptions: MyLocationStyleOptions(
|
||||
true,
|
||||
),
|
||||
// 普通地图normal,卫星地图satellite,夜间视图night,导航视图 navi,公交视图bus,
|
||||
mapType: MapType.normal,
|
||||
// 缩放级别范围
|
||||
minMaxZoomPreference:
|
||||
const MinMaxZoomPreference(3, 20),
|
||||
// 隐私政策包含高德 必须填写
|
||||
privacyStatement: const AMapPrivacyStatement(
|
||||
hasAgree: true, hasContains: true, hasShow: true),
|
||||
// 地图创建成功时返回AMapController
|
||||
onMapCreated: (AMapController controller) {
|
||||
mapController = controller;
|
||||
},
|
||||
onLocationChanged: (AMapLocation location) {
|
||||
print("onLocationChanged ${location}");
|
||||
},
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
margin:
|
||||
EdgeInsets.only(left: 25.w, top: 20.h, right: 25.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text('检查以确保以下地址是正确的'.tr,
|
||||
style: TextStyle(fontSize: 24.sp))),
|
||||
],
|
||||
),
|
||||
),
|
||||
// SizedBox(height: 20.h),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
// height: 45.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 25.w, top: 20.h, right: 25.w),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
SizedBox(
|
||||
height: 1.sw / 5 * 4,
|
||||
width: 1.sw,
|
||||
child: AMapWidget(
|
||||
apiKey: AMapApiKey(
|
||||
iosKey: F.aMapKey.iosKey,
|
||||
androidKey: F.aMapKey.androidKey),
|
||||
// 初始化地图中心
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: LatLng(
|
||||
double.parse(
|
||||
_addressInfo!['latitude'].toString()),
|
||||
double.parse(
|
||||
_addressInfo!['longitude'].toString())),
|
||||
zoom: 10.0,
|
||||
),
|
||||
//定位小蓝点
|
||||
myLocationStyleOptions: MyLocationStyleOptions(
|
||||
true,
|
||||
),
|
||||
// 普通地图normal,卫星地图satellite,夜间视图night,导航视图 navi,公交视图bus,
|
||||
mapType: MapType.normal,
|
||||
// 缩放级别范围
|
||||
minMaxZoomPreference:
|
||||
const MinMaxZoomPreference(3, 20),
|
||||
// 隐私政策包含高德 必须填写
|
||||
privacyStatement: const AMapPrivacyStatement(
|
||||
hasAgree: true, hasContains: true, hasShow: true),
|
||||
// 地图创建成功时返回AMapController
|
||||
onMapCreated: (AMapController controller) {
|
||||
mapController = controller;
|
||||
},
|
||||
onLocationChanged: (AMapLocation location) {
|
||||
print("onLocationChanged ${location}");
|
||||
},
|
||||
),
|
||||
),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
margin:
|
||||
EdgeInsets.only(left: 25.w, top: 20.h, right: 25.w),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
addressInfo!['address'].toString() ??
|
||||
'',
|
||||
style: const TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
overflow: TextOverflow.clip))),
|
||||
Flexible(
|
||||
child: Text('检查以确保以下地址是正确的'.tr,
|
||||
style: TextStyle(fontSize: 24.sp))),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5.h),
|
||||
Container(
|
||||
height: 1.h,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
)
|
||||
),
|
||||
// SizedBox(height: 20.h),
|
||||
Container(
|
||||
// color: Colors.red,
|
||||
// height: 45.h,
|
||||
margin: EdgeInsets.only(
|
||||
left: 25.w, top: 20.h, right: 25.w),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: Text(
|
||||
_addressInfo!['address'].toString() ??
|
||||
'',
|
||||
style: const TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
overflow: TextOverflow.clip))),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 5.h),
|
||||
Container(
|
||||
height: 1.h,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
],
|
||||
)),
|
||||
],
|
||||
)
|
||||
: SizedBox(
|
||||
height: 1.sw / 5 * 4 + 65.h * 2,
|
||||
child: Center(child: Text('地图加载中,请稍候。。。'.tr))),
|
||||
height: 1.sw / 5 * 4 + 65.h * 2,
|
||||
child: Center(child: Text('地图加载中,请稍候。。。'.tr))),
|
||||
),
|
||||
SizedBox(height: 200.h),
|
||||
Row(
|
||||
@ -227,13 +299,13 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||
style: TextStyle(color: Colors.black, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () {
|
||||
if (addressInfo!.isEmpty) {
|
||||
if (_addressInfo!.isEmpty) {
|
||||
logic.showToast('还未获取到位置信息哦,请耐心等待一下!'.tr);
|
||||
return;
|
||||
}
|
||||
Get.toNamed(Routers.saveLockPage,
|
||||
arguments: <String, Object?>{
|
||||
'addressInfo': addressInfo,
|
||||
'addressInfo': _addressInfo,
|
||||
'pwdTimestamp': state.pwdTimestamp.value,
|
||||
'lockInfo': state.lockInfo,
|
||||
'featureValue': state.featureValue,
|
||||
@ -251,70 +323,31 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||
);
|
||||
}
|
||||
|
||||
///设置定位参数
|
||||
void _setLocationOption() {
|
||||
AMapLocationOption locationOption = AMapLocationOption();
|
||||
|
||||
///是否单次定位
|
||||
locationOption.onceLocation = true;
|
||||
|
||||
///是否需要返回逆地理信息
|
||||
locationOption.needAddress = true;
|
||||
|
||||
///逆地理信息的语言类型
|
||||
locationOption.geoLanguage = GeoLanguage.DEFAULT;
|
||||
|
||||
locationOption.desiredLocationAccuracyAuthorizationMode =
|
||||
AMapLocationAccuracyAuthorizationMode.ReduceAccuracy;
|
||||
|
||||
locationOption.fullAccuracyPurposeKey = 'AMapLocationScene';
|
||||
|
||||
///设置Android端连续定位的定位间隔
|
||||
locationOption.locationInterval = 2000;
|
||||
|
||||
///设置Android端的定位模式<br>
|
||||
///可选值:<br>
|
||||
///<li>[AMapLocationMode.Battery_Saving]</li>
|
||||
///<li>[AMapLocationMode.Device_Sensors]</li>
|
||||
///<li>[AMapLocationMode.Hight_Accuracy]</li>
|
||||
locationOption.locationMode = AMapLocationMode.Battery_Saving;
|
||||
|
||||
///设置iOS端的定位最小更新距离<br>
|
||||
locationOption.distanceFilter = -1;
|
||||
|
||||
///设置iOS端期望的定位精度
|
||||
/// 可选值:<br>
|
||||
/// <li>[DesiredAccuracy.Best] 最高精度</li>
|
||||
/// <li>[DesiredAccuracy.BestForNavigation] 适用于导航场景的高精度 </li>
|
||||
/// <li>[DesiredAccuracy.NearestTenMeters] 10米 </li>
|
||||
/// <li>[DesiredAccuracy.Kilometer] 1000米</li>
|
||||
/// <li>[DesiredAccuracy.ThreeKilometers] 3000米</li>
|
||||
locationOption.desiredAccuracy = DesiredAccuracy.BestForNavigation;
|
||||
|
||||
///设置iOS端是否允许系统暂停定位
|
||||
locationOption.pausesLocationUpdatesAutomatically = false;
|
||||
|
||||
///将定位参数设置给定位插件
|
||||
location.setLocationOption(locationOption);
|
||||
///获取iOS native的accuracyAuthorization类型
|
||||
void requestAccuracyAuthorization() async {
|
||||
AMapAccuracyAuthorization currentAccuracyAuthorization =
|
||||
await _amapLocationPlugin.getSystemAccuracyAuthorization();
|
||||
if (currentAccuracyAuthorization ==
|
||||
AMapAccuracyAuthorization.AMapAccuracyAuthorizationFullAccuracy) {
|
||||
print("精确定位类型");
|
||||
} else if (currentAccuracyAuthorization ==
|
||||
AMapAccuracyAuthorization.AMapAccuracyAuthorizationReducedAccuracy) {
|
||||
print("模糊定位类型");
|
||||
} else {
|
||||
print("未知定位类型");
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
|
||||
BlueManage().disconnect();
|
||||
|
||||
location.stopLocation();
|
||||
location.destroy();
|
||||
/// 动态申请定位权限
|
||||
void requestPermission() async {
|
||||
// 申请权限
|
||||
final bool hasLocationPermission =
|
||||
await PermissionDialog.request(Permission.location);
|
||||
if (hasLocationPermission) {
|
||||
print("定位权限申请通过");
|
||||
} else {
|
||||
print("定位权限申请不通过");
|
||||
}
|
||||
}
|
||||
|
||||
/// 从上级界面进入 当前界面即将出现
|
||||
@ -340,7 +373,7 @@ class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
|
||||
void didPushNext() {
|
||||
super.didPushNext();
|
||||
|
||||
location.stopLocation();
|
||||
location.destroy();
|
||||
_amapLocationPlugin.stopLocation();
|
||||
_amapLocationPlugin.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
30
pubspec.lock
30
pubspec.lock
@ -73,7 +73,7 @@ packages:
|
||||
source: hosted
|
||||
version: "2.6.0"
|
||||
asn1lib:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: asn1lib
|
||||
sha256: "4bae5ae63e6d6dd17c4aac8086f3dec26c0236f6a0f03416c6c19d830c367cf5"
|
||||
@ -329,21 +329,13 @@ packages:
|
||||
source: hosted
|
||||
version: "0.3.4+2"
|
||||
crypto:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.3"
|
||||
cryptography:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cryptography
|
||||
sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -417,7 +409,7 @@ packages:
|
||||
source: hosted
|
||||
version: "3.4.0"
|
||||
encrypt:
|
||||
dependency: "direct main"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: encrypt
|
||||
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
|
||||
@ -456,14 +448,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
fast_rsa:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fast_rsa
|
||||
sha256: f2bc97888877e93242a4eb1ee8d88ed77b593f02ad6a1b0ae188945809d52ca3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.6.6"
|
||||
ffi:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -576,14 +560,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
flat_buffers:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flat_buffers
|
||||
sha256: "23e2ced0d8e8ecdffbd9f267f49a668c74438393b9acaeac1c724123e3764263"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.5"
|
||||
flustars:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user