feat: 移除地图相关业务、添加锁新增安全性判断

This commit is contained in:
DaisyWu 2025-05-06 15:05:22 +08:00
parent a091bc2869
commit c49e7cab03
13 changed files with 36 additions and 820 deletions

View File

@ -156,9 +156,6 @@ import 'main/lockMian/demoMode/demoModeLockSet/demoModeLockSet_page.dart';
import 'main/lockMian/lockMain/lockMain_page.dart';
import 'mine/about/about_page.dart';
import 'mine/addLock/addLock/addLock_page.dart';
import 'mine/addLock/addLockSelectCountry/addLockSelectCountry_page.dart';
import 'mine/addLock/lockAddress/gaode/lockAddressGaoDe_page.dart';
import 'mine/addLock/lockAddress/lockAddress/lockAddress_page.dart';
import 'mine/addLock/nearbyLock/nearbyLock_page.dart';
import 'mine/addLock/saveLock/saveLock_page.dart';
import 'mine/addLock/selectLockType/selectLockType_page.dart';
@ -715,10 +712,6 @@ abstract class AppRouters {
name: Routers.nearbyDoorMagneticPage,
page: () => const NearbyDoorMagneticPage(),
),
GetPage<dynamic>(
name: Routers.lockAddressPage,
page: () => const LockAddressPage(),
),
GetPage<dynamic>(
name: Routers.remoteUnlockingPage,
page: () => const RemoteUnlockingPage(),
@ -1007,9 +1000,6 @@ abstract class AppRouters {
GetPage<dynamic>(
name: Routers.adminDetailChangeDatePage,
page: () => const AdminDetailChangeDatePage()),
GetPage<dynamic>(
name: Routers.lockAddressGaoDePage,
page: () => const LockAddressGaoDePage()),
GetPage<dynamic>(
name: Routers.safeVerifyPage, page: () => const SafeVerifyPage()),
GetPage<dynamic>(
@ -1023,9 +1013,6 @@ abstract class AppRouters {
GetPage<dynamic>(
name: Routers.demoModeLockDetailPage,
page: () => const DemoModeLockDetailPage()),
GetPage<dynamic>(
name: Routers.addLockSelectCountryPage,
page: () => const AddLockSelectCountryPage()),
GetPage<dynamic>(
name: Routers.faceUnlockPage, page: () => const FaceUnlockPage()),
GetPage<dynamic>(

View File

@ -1,8 +0,0 @@
import '../../../tools/baseGetXController.dart';
import 'addLockSelectCountry_state.dart';
class AddLockSelectCountryLogic extends BaseGetXController {
AddLockSelectCountryState state = AddLockSelectCountryState();
}

View File

@ -1,187 +0,0 @@
import 'package:azlistview/azlistview.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/mine/addLock/addLockSelectCountry/addLockSelectCountry_state.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import '../../../appRouters.dart';
import '../../../app_settings/app_colors.dart';
import '../../../login/selectCountryRegion/common/countryRegionEntity.dart';
import '../../../network/api_repository.dart';
import '../../../tools/commonItem.dart';
import '../../../tools/titleAppBar.dart';
import 'addLockSelectCountry_logic.dart';
class AddLockSelectCountryPage extends StatefulWidget {
const AddLockSelectCountryPage({Key? key}) : super(key: key);
@override
State<AddLockSelectCountryPage> createState() => _AddLockSelectCountryPageState();
}
class _AddLockSelectCountryPageState extends State<AddLockSelectCountryPage> {
final AddLockSelectCountryLogic logic = Get.put(AddLockSelectCountryLogic());
final AddLockSelectCountryState state = Get.find<AddLockSelectCountryLogic>().state;
List<CountryRegionModel> countriesList = [];
int selectindex = 10000;
@override
void initState() {
super.initState();
SuspensionUtil.setShowSuspensionStatus(
countriesList.cast<ISuspensionBean>());
Future.delayed(const Duration(milliseconds: 20), getCountriesListRequest);
}
///json文件
Future<void> getCountriesListRequest() async {
final CountryRegionEntity entity = await ApiRepository.to.getCountryRegion('1');
countriesList.clear();
if (entity.errorCode!.codeIsSuccessful) {
countriesList.addAll(entity.dataList!);
_handleList(countriesList);
}
}
Future<String> loadJsonFromAssets(String assetsPath) async {
return await rootBundle.loadString(assetsPath);
}
void _handleList(List<CountryRegionModel> list) {
if (list.isEmpty) return;
for (int i = 0, length = list.length; i < length; i++) {
final CountryRegionModel countryModel = list[i];
final String tag = countryModel.group!;
if (RegExp('[A-Z]').hasMatch(tag)) {
list[i].tagIndex = tag;
} else {
list[i].tagIndex = '#';
}
}
// A-Z sort.
SuspensionUtil.sortListBySuspensionTag(list);
// show sus tag.
SuspensionUtil.setShowSuspensionStatus(countriesList);
setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: const Color(0xFFFFFFFF),
appBar: TitleAppBar(
barTitle: '请选择您的位置'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
),
body: Column(
children: [
Expanded(
child: ListView.builder(
itemCount: countriesList.length,
itemBuilder: (BuildContext c, int index) {
final CountryRegionModel model = countriesList[index];
return CommonItem(
leftTitel: model.name,
rightTitle: '',
allHeight: 60.h,
isHaveLine: true,
isHaveRightWidget: true,
action: (){
setState(() {
selectindex = index;
});
},
rightWidget: Row(
children: [
Image.asset((selectindex == index) ? 'images/icon_round_select.png' : 'images/icon_round_unSelect.png', width: 30.w, height: 30.w,),
],
)
);
}
),
),
Container(
margin: EdgeInsets.only(top: 30.h, bottom: 30.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
TextButton(
child: Text(
'跳过'.tr,
style: TextStyle(color: Colors.black, fontSize: 24.sp),
),
onPressed: () {
Get.toNamed(Routers.saveLockPage, arguments: {
'addressInfo': {},
'pwdTimestamp': state.pwdTimestamp.value,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
'isFromMap': 0,
});
},
),
TextButton(
child: Text(
'下一步'.tr,
style: TextStyle(color: Colors.black, fontSize: 24.sp),
),
onPressed: () {
if(selectindex == 10000){
logic.showToast('请选择国家'.tr);
return;
}
final CountryRegionModel model = countriesList[selectindex];
Get.toNamed(Routers.saveLockPage, arguments: {
'addressInfo': {'country':model.name},
'pwdTimestamp': state.pwdTimestamp.value,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
'isFromMap': 0,
});
// Navigator.pushNamed(context, Routers.saveLockPage);
},
),
],
),
)
],
),
// body: AzListView(
// data: countriesList,
// itemCount: countriesList.length,
// itemBuilder: (BuildContext context, int index) {
// CountryRegionModel model = countriesList[index];
// model.code = " ";
// return Utils.getListItem(context, model, () {
// Map<String, dynamic> resultMap = {};
// resultMap['code'] = model.code;
// resultMap['countryId'] = model.countryId.toString();
// resultMap['countryName'] = model.name;
// Navigator.pop(context, resultMap);
// });
// },
// padding: EdgeInsets.zero,
// susItemBuilder: (BuildContext context, int index) {
// CountryRegionModel model = countriesList[index];
// String tag = model.getSuspensionTag();
// return Utils.getSusItem(context, tag);
// },
// // indexBarData: const ['', ...kIndexBarData],
// ),
);
}
}

View File

@ -1,19 +0,0 @@
import 'package:get/get.dart';
class AddLockSelectCountryState{
var pwdTimestamp= 0.obs;
var lockInfo = {};
var featureValue = '';
var featureSettingValue = '';
var featureSettingParams = [];
AddLockSelectCountryState() {
Map map = Get.arguments;
pwdTimestamp.value = map["pwdTimestamp"];
lockInfo = map["lockInfo"];
featureValue = map["featureValue"];
featureSettingValue = map["featureSettingValue"];
featureSettingParams = map["featureSettingParams"];
}
}

View File

@ -1,28 +0,0 @@
import 'package:star_lock/tools/baseGetXController.dart';
import 'lockAddressGaoDe_state.dart';
class LockAddressGaoDeLogic extends BaseGetXController{
LockAddressGaoDeState state = LockAddressGaoDeState();
void pushAddAction(){
}
@override
void onReady() {
super.onReady();
}
@override
void onInit() {
super.onInit();
}
@override
void onClose() {
super.onClose();
}
}

View File

@ -1,386 +0,0 @@
import 'dart:async';
import 'dart:io';
import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:star_lock/mine/addLock/lockAddress/gaode/lockAddressGaoDe_state.dart';
import 'package:star_lock/widget/permission/permission_dialog.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../flavors.dart';
import '../../../../tools/titleAppBar.dart';
import 'lockAddressGaoDe_logic.dart';
class LockAddressGaoDePage extends StatefulWidget {
const LockAddressGaoDePage({Key? key}) : super(key: key);
@override
State<LockAddressGaoDePage> createState() => _LockAddressGaoDePageState();
}
class _LockAddressGaoDePageState extends State<LockAddressGaoDePage>
with RouteAware {
final LockAddressGaoDeLogic logic = Get.put(LockAddressGaoDeLogic());
final LockAddressGaoDeState state = Get.find<LockAddressGaoDeLogic>().state;
AMapController? mapController;
Map<String, Object>? _addressInfo;
late StreamSubscription<Map<String, Object>> _locationListener;
AMapFlutterLocation _amapLocationPlugin = AMapFlutterLocation();
@override
void initState() {
super.initState();
/// 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");
///iOS native精度类型
if (Platform.isIOS) {
requestAccuracyAuthorization();
}
///
_locationListener = _amapLocationPlugin
.onLocationChanged()
.listen((Map<String, Object> result) {
setState(() {
_addressInfo = result;
});
});
WidgetsBinding.instance.addPostFrameCallback((_) {
_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
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: '锁地址'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
),
body: ListView(
children: <Widget>[
Container(
margin: EdgeInsets.only(
left: 25.w, right: 25.w, top: 40.h, bottom: 40.w),
child: Center(
child: Text(
'地理位置'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 50.sp),
softWrap: true,
overflow: TextOverflow.visible,
),
),
),
SizedBox(
child: (_addressInfo != null &&
_addressInfo!.containsKey('latitude'))
? Column(
children: <Widget>[
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>[
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(
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))),
),
Container(
constraints: BoxConstraints(maxHeight: 150.h),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
TextButton(
child: Text(
'跳过'.tr,
style: TextStyle(color: Colors.black, fontSize: 24.sp),
),
onPressed: () {
Get.toNamed(Routers.addLockSelectCountryPage,
arguments: <String, Object>{
'addressInfo': {},
'pwdTimestamp': state.pwdTimestamp.value,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
});
},
),
TextButton(
child: Text(
'下一步'.tr,
style: TextStyle(color: Colors.black, fontSize: 24.sp),
),
onPressed: () {
if (_addressInfo!.isEmpty) {
logic.showToast('还未获取到位置信息哦,请耐心等待一下!'.tr);
return;
}
Get.toNamed(Routers.saveLockPage,
arguments: <String, Object?>{
'addressInfo': _addressInfo,
'pwdTimestamp': state.pwdTimestamp.value,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
'isFromMap': 1,
});
// Navigator.pushNamed(context, Routers.saveLockPage);
},
),
],
)
],
),
);
}
///iOS native的accuracyAuthorization类型
void requestAccuracyAuthorization() async {
AMapAccuracyAuthorization currentAccuracyAuthorization =
await _amapLocationPlugin.getSystemAccuracyAuthorization();
if (currentAccuracyAuthorization ==
AMapAccuracyAuthorization.AMapAccuracyAuthorizationFullAccuracy) {
print("精确定位类型");
} else if (currentAccuracyAuthorization ==
AMapAccuracyAuthorization.AMapAccuracyAuthorizationReducedAccuracy) {
print("模糊定位类型");
} else {
print("未知定位类型");
}
}
///
void requestPermission() async {
//
final bool hasLocationPermission =
await PermissionDialog.request(Permission.location);
if (hasLocationPermission) {
print("定位权限申请通过");
} else {
print("定位权限申请不通过");
}
}
///
@override
void didPush() {
super.didPush();
}
///
@override
void didPop() {
super.didPop();
}
///
@override
void didPopNext() {
super.didPopNext();
}
///
@override
void didPushNext() {
super.didPushNext();
_amapLocationPlugin.stopLocation();
_amapLocationPlugin.destroy();
}
}

View File

@ -1,24 +0,0 @@
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:amap_flutter_base/amap_flutter_base.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
class LockAddressGaoDeState{
var pwdTimestamp= 0.obs;
var lockInfo = {};
var featureValue = '';
var featureSettingValue = '';
var featureSettingParams = [];
LockAddressGaoDeState() {
Map map = Get.arguments;
pwdTimestamp.value = map["pwdTimestamp"];
lockInfo = map["lockInfo"];
featureValue = map["featureValue"];
featureSettingValue = map["featureSettingValue"];
featureSettingParams = map["featureSettingParams"];
}
}

View File

@ -1,62 +0,0 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
// import 'package:google_maps_flutter/google_maps_flutter.dart';
class LockAddressGooglePage extends StatefulWidget {
const LockAddressGooglePage({Key? key}) : super(key: key);
@override
State<LockAddressGooglePage> createState() => _LockAddressGooglePageState();
}
class _LockAddressGooglePageState extends State<LockAddressGooglePage> {
var deviceFindData = Get.arguments['data'];
var source;
var result;
// LatLng _kMapCenter;
// CameraPosition _kInitialPosition;
var _markers;
var setmarkers;
var restaurantMarker;
bool isSetupReady = false;
String? currentAddress;
@override
void initState() {
super.initState();
// doSetup();
}
//
// doSetup() async {
// List<Placemark> placemarks = await placemarkFromCoordinates(deviceFindData.latitude, deviceFindData.longitude);
// Placemark place1 = placemarks[0];
// currentAddress = "${place1.country} ${place1.administrativeArea} ${place1.locality} ${place1.subLocality} ${place1.name}";
// // AppLog.log("objectfasdfasdfasdfasdf:${placemarks}fasdfasdf${place1} ${currentAddress}");
//
// restaurantMarker = await BitmapDescriptor.fromAssetImage(
// ImageConfiguration(size: Size(w(27), h(31))), Platform.isIOS ? R.assetsImgsDeviceFindDeviceIcon : R.assetsImgsDeviceFindDeviceAndroidIcon);
// _markers = [
// Marker(
// markerId: MarkerId("marker_2"),
// infoWindow: InfoWindow(title: currentAddress),
// icon: restaurantMarker,
// // position:_kMapCenter,
// ),
// ];
// setmarkers = _markers.toSet();
// setState(() {
// isSetupReady = true;
// });
// }
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

View File

@ -1,6 +0,0 @@
import '../../../../tools/baseGetXController.dart';
class LockAddressLogic extends BaseGetXController {
}

View File

@ -1,76 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../../../appRouters.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/titleAppBar.dart';
class LockAddressPage extends StatefulWidget {
const LockAddressPage({Key? key}) : super(key: key);
@override
State<LockAddressPage> createState() => _LockAddressPageState();
}
class _LockAddressPageState extends State<LockAddressPage> with RouteAware{
Map<String, Object>? addressInfo;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
barTitle: '锁地址'.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
'下一步'.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {
if(addressInfo!.isEmpty){
EasyLoading.showToast('请先获取到位置信息哦'.tr, duration: 2000.milliseconds);
return;
}
Get.toNamed(Routers.saveLockPage, arguments: addressInfo);
// Navigator.pushNamed(context, Routers.saveLockPage);
},
),
],
),
// body: LockAddressGaoDePage(callback: (addressInfoMap){
// addressInfo = addressInfoMap;
// },)
body: Container(),
);
}
@override
void dispose() {
super.dispose();
// routeObserver.unsubscribe(this);
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
// routeObserver RouteAware
// routeObserver.subscribe(this, ModalRoute.of(context) as PageRoute);
}
@override
void didPush() {
//
}
@override
void didPopNext() {
//
}
}

View File

@ -330,13 +330,24 @@ class NearbyLockLogic extends BaseGetXController {
state.featureSettingParams = featureParaTotalList;
AppLog.log('featureParaTotalList:$featureParaTotalList');
Get.toNamed(Routers.lockAddressGaoDePage, arguments: <String, Object>{
'pwdTimestamp': state.timestampValue * 1000,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
});
// Get.toNamed(Routers.lockAddressGaoDePage, arguments: <String, Object>{
// 'pwdTimestamp': state.timestampValue * 1000,
// 'lockInfo': state.lockInfo,
// 'featureValue': state.featureValue,
// 'featureSettingValue': state.featureSettingValue,
// 'featureSettingParams': state.featureSettingParams,
// });
Get.toNamed(Routers.saveLockPage,
arguments: <String, Object?>{
'addressInfo': {},
'pwdTimestamp': state.timestampValue * 1000,
'lockInfo': state.lockInfo,
'featureValue': state.featureValue,
'featureSettingValue': state.featureSettingValue,
'featureSettingParams': state.featureSettingParams,
'isFromMap': 0,
});
break;
case 0x06:

View File

@ -15,13 +15,27 @@ class SaveLockState {
adminPassword = getAdminPassword();
final Map map = Get.arguments;
if (map['pwdTimestamp']!= null) {
pwdTimestamp.value = map['pwdTimestamp'];
}
if (map['addressInfo'] != null) {
addressInfo.value = map['addressInfo'];
}
if (map['lockInfo'] != null) {
lockInfo = map['lockInfo'];
}
if (map['featureValue'] != null) {
featureValue = map['featureValue'];
}
if (map['featureSettingValue'] != null) {
featureSettingValue = map['featureSettingValue'];
}
if (map['featureSettingParams'] != null) {
featureSettingParams = map['featureSettingParams'];
}
if (map['isFromMap'] != null) {
isFromMap = map['isFromMap'];
}
}
RxString aliName = ''.obs;
RxInt pwdTimestamp = 0.obs;

View File

@ -194,14 +194,14 @@ dependencies:
easy_refresh: ^3.3.4
#高德地图定位
amap_flutter_location: 3.0.0
# amap_flutter_location: 3.0.0
#权限使用
permission_handler: ^11.3.1
#高德地图地图
amap_flutter_map: 3.0.0
# #高德地图地图
# amap_flutter_map: 3.0.0
# 谷歌地图
google_maps_flutter: ^2.2.5
# google_maps_flutter: ^2.2.5
# geocoding: ^2.1.0
# 允许App发现网络的相关信息并且进行相应的配置