develop_sky #1
@ -69,8 +69,7 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -148,8 +147,7 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) async {
|
onPressed: (BuildContext context) async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ?? false;
|
||||||
false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -180,7 +178,8 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
|||||||
arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'fingerprintItemData': fingerprintItemData,
|
'fingerprintItemData': fingerprintItemData,
|
||||||
})!
|
})!
|
||||||
.then((value) => logic.getICCardListData(isRefresh: true));
|
.then((value) =>
|
||||||
|
logic.getICCardListData(isRefresh: true));
|
||||||
// if (data != null) {
|
// if (data != null) {
|
||||||
// logic.getICCardListData(isRefresh: true);
|
// logic.getICCardListData(isRefresh: true);
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -335,7 +335,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.isRemoteUnlock.value,
|
value: state.isRemoteUnlock.value,
|
||||||
onChanged: (bool value) async {
|
onChanged: (bool value) async {
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -352,7 +352,7 @@ class _ElectronicKeyDetailPageState extends State<ElectronicKeyDetailPage> {
|
|||||||
thumbColor: CupertinoColors.white,
|
thumbColor: CupertinoColors.white,
|
||||||
value: state.onlyManageYouCreatesUser.value,
|
value: state.onlyManageYouCreatesUser.value,
|
||||||
onChanged: (bool value) async {
|
onChanged: (bool value) async {
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,8 +68,7 @@ class _ElectronicKeyListPageState extends State<ElectronicKeyListPage> {
|
|||||||
final bool? isDemoMode =
|
final bool? isDemoMode =
|
||||||
await Storage.getBool(ifIsDemoModeOrNot);
|
await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,8 +48,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -160,8 +159,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
|||||||
Widget _buildDeleteBtn(FingerprintItemData faceItemData) {
|
Widget _buildDeleteBtn(FingerprintItemData faceItemData) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,8 +54,7 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -133,8 +132,7 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) async {
|
onPressed: (BuildContext context) async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ?? false;
|
||||||
false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -46,8 +45,7 @@ class _IrisListPageState extends State<IrisListPage> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -80,11 +78,11 @@ class _IrisListPageState extends State<IrisListPage> {
|
|||||||
// "lockId": state.lockId.value,
|
// "lockId": state.lockId.value,
|
||||||
// "fromType": 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
// "fromType": 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
// });
|
// });
|
||||||
final data =
|
final data = await Get.toNamed(Routers.addIrisTypeManagePage,
|
||||||
await Get.toNamed(Routers.addIrisTypeManagePage, arguments: <String, int>{
|
arguments: <String, int>{
|
||||||
'lockId': state.lockId.value,
|
'lockId': state.lockId.value,
|
||||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
// logic.getFaceListData();
|
// logic.getFaceListData();
|
||||||
}
|
}
|
||||||
@ -130,10 +128,10 @@ class _IrisListPageState extends State<IrisListPage> {
|
|||||||
// ? "永久"
|
// ? "永久"
|
||||||
// : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}",
|
// : "${DateTool().dateToYMDHNString(fingerprintItemData.startDate.toString())} - ${DateTool().dateToYMDHNString(fingerprintItemData.endDate.toString())}",
|
||||||
() async {
|
() async {
|
||||||
final data =
|
final data = await Get.toNamed(Routers.faceDetailPage,
|
||||||
await Get.toNamed(Routers.faceDetailPage, arguments: <String, FingerprintItemData>{
|
arguments: <String, FingerprintItemData>{
|
||||||
'faceItemData': getFaceItemData,
|
'faceItemData': getFaceItemData,
|
||||||
});
|
});
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
// logic.getFaceListData();
|
// logic.getFaceListData();
|
||||||
}
|
}
|
||||||
@ -254,35 +252,35 @@ class _IrisListPageState extends State<IrisListPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void showDeletAlertDialog(BuildContext context) {
|
// void showDeletAlertDialog(BuildContext context) {
|
||||||
// showCupertinoDialog(
|
// showCupertinoDialog(
|
||||||
// context: context,
|
// context: context,
|
||||||
// builder: (BuildContext context) {
|
// builder: (BuildContext context) {
|
||||||
// return CupertinoAlertDialog(
|
// return CupertinoAlertDialog(
|
||||||
// title: const Text('提示'),
|
// title: const Text('提示'),
|
||||||
// content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
// content: const Text('重置后,该锁的人脸都将被删除哦,确认要重置吗?'),
|
||||||
// actions: <Widget>[
|
// actions: <Widget>[
|
||||||
// CupertinoDialogAction(
|
// CupertinoDialogAction(
|
||||||
// child: Text('取消'.tr),
|
// child: Text('取消'.tr),
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
// },
|
// },
|
||||||
// ),
|
// ),
|
||||||
// CupertinoDialogAction(
|
// CupertinoDialogAction(
|
||||||
// child: Text('确定'.tr),
|
// child: Text('确定'.tr),
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
// state.isDeletFaceData = true;
|
// state.isDeletFaceData = true;
|
||||||
// state.isDeletAll = true;
|
// state.isDeletAll = true;
|
||||||
// state.deletKeyID = '1';
|
// state.deletKeyID = '1';
|
||||||
// state.deletUserID = 'DeleteAll!@#';
|
// state.deletUserID = 'DeleteAll!@#';
|
||||||
// state.deletFaceNo = 255;
|
// state.deletFaceNo = 255;
|
||||||
// // logic.senderAddFace();
|
// // logic.senderAddFace();
|
||||||
// },
|
// },
|
||||||
// ),
|
// ),
|
||||||
// ],
|
// ],
|
||||||
// );
|
// );
|
||||||
// },
|
// },
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1432,7 +1432,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
|
|
||||||
//如果需要实名认证,需认证完成,方可开锁
|
//如果需要实名认证,需认证完成,方可开锁
|
||||||
Future<void> isNeedRealNameAuthThenOpenLock() async {
|
Future<void> isNeedRealNameAuthThenOpenLock() async {
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
final bool isOpenLockNeedOnline = state.isOpenLockNeedOnline.value == 0;
|
||||||
if (!isOpenLockNeedOnline && !isNetWork) {
|
if (!isOpenLockNeedOnline && !isNetWork) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -22,9 +21,12 @@ class UploadElectricQuantityPage extends StatefulWidget {
|
|||||||
_UploadElectricQuantityPageState();
|
_UploadElectricQuantityPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage> with RouteAware {
|
class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
||||||
final UploadElectricQuantityLogic logic = Get.put(UploadElectricQuantityLogic());
|
with RouteAware {
|
||||||
final UploadElectricQuantityState state = Get.find<UploadElectricQuantityLogic>().state;
|
final UploadElectricQuantityLogic logic =
|
||||||
|
Get.put(UploadElectricQuantityLogic());
|
||||||
|
final UploadElectricQuantityState state =
|
||||||
|
Get.find<UploadElectricQuantityLogic>().state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -42,7 +44,8 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text('电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新'.tr,
|
child: Text(
|
||||||
|
'电量信息可以通过网关远程更新,或通过手机蓝牙在锁旁边更新'.tr,
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
@ -51,39 +54,42 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
height: 40.h,
|
height: 40.h,
|
||||||
),
|
),
|
||||||
Obx(() => Row(
|
Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池1电量".tr}:${state.lockBasicInfo.value.electricQuantity ?? ""}%",
|
"${"电池1电量".tr}:${state.lockBasicInfo.value.electricQuantity ?? ""}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: (state.lockSetInfoData.value.lockFeature ?? LockFeature()).isSupportBackupBattery == 1,
|
visible:
|
||||||
|
(state.lockSetInfoData.value.lockFeature ?? LockFeature())
|
||||||
|
.isSupportBackupBattery ==
|
||||||
|
1,
|
||||||
child: Obx(() => Row(
|
child: Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电池2电量".tr}:${state.lockBasicInfo.value.electricQuantityStandby ?? ""}%",
|
"${"电池2电量".tr}:${state.lockBasicInfo.value.electricQuantityStandby ?? ""}%",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
Obx(() => Row(
|
Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"电量更新时间".tr}:${state.uploadElectricQuantityDate.value == 0 ? "-" : DateTool().dateToYMDHNString(state.uploadElectricQuantityDate.value.toString())}",
|
"${"电量更新时间".tr}:${state.uploadElectricQuantityDate.value == 0 ? "-" : DateTool().dateToYMDHNString(state.uploadElectricQuantityDate.value.toString())}",
|
||||||
style: TextStyle(fontSize: 20.sp),
|
style: TextStyle(fontSize: 20.sp),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30.h,
|
height: 30.h,
|
||||||
),
|
),
|
||||||
@ -94,7 +100,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -102,8 +108,7 @@ class _UploadElectricQuantityPageState extends State<UploadElectricQuantityPage>
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
@ -19,7 +18,7 @@ class BurglarAlarmPage extends StatefulWidget {
|
|||||||
State<BurglarAlarmPage> createState() => _BurglarAlarmPageState();
|
State<BurglarAlarmPage> createState() => _BurglarAlarmPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware {
|
||||||
final BurglarAlarmLogic logic = Get.put(BurglarAlarmLogic());
|
final BurglarAlarmLogic logic = Get.put(BurglarAlarmLogic());
|
||||||
final BurglarAlarmState state = Get.find<BurglarAlarmLogic>().state;
|
final BurglarAlarmState state = Get.find<BurglarAlarmLogic>().state;
|
||||||
|
|
||||||
@ -49,27 +48,28 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
|||||||
height: 20.h,
|
height: 20.h,
|
||||||
),
|
),
|
||||||
Obx(() => Row(
|
Obx(() => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"${"当前模式".tr} : ${state.burglarAlarmEnable.value == 1 ? '已开启'.tr : '已关闭'.tr}",
|
"${"当前模式".tr} : ${state.burglarAlarmEnable.value == 1 ? '已开启'.tr : '已关闭'.tr}",
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(fontSize: 22.sp, fontWeight: FontWeight.w600),
|
fontSize: 22.sp, fontWeight: FontWeight.w600),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 40.h,
|
height: 40.h,
|
||||||
),
|
),
|
||||||
Obx(() => SubmitBtn(
|
Obx(() => SubmitBtn(
|
||||||
btnName: state.burglarAlarmEnable.value == 1 ? '关闭'.tr : '开启'.tr,
|
btnName:
|
||||||
|
state.burglarAlarmEnable.value == 1 ? '关闭'.tr : '开启'.tr,
|
||||||
borderRadius: 20.w,
|
borderRadius: 20.w,
|
||||||
fontSize: 32.sp,
|
fontSize: 32.sp,
|
||||||
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
// margin: EdgeInsets.only(left: 03.w, right: 30.w, top: 20.w),
|
||||||
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
padding: EdgeInsets.only(top: 20.w, bottom: 20.w),
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final bool isNetWork = await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -77,8 +77,7 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
|||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -137,5 +136,4 @@ class _BurglarAlarmPageState extends State<BurglarAlarmPage> with RouteAware{
|
|||||||
state.ifCurrentScreen.value = false;
|
state.ifCurrentScreen.value = false;
|
||||||
state.sureBtnState.value = 0;
|
state.sureBtnState.value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -182,8 +182,7 @@ class _LockSetPageState extends State<LockSetPage>
|
|||||||
// logic.deletLockInfoData();
|
// logic.deletLockInfoData();
|
||||||
// showDeletAlertDialog(context);
|
// showDeletAlertDialog(context);
|
||||||
// showDeletPasswordAlertDialog(context);
|
// showDeletPasswordAlertDialog(context);
|
||||||
final bool isNetWork =
|
final bool isNetWork = await logic.isConnected() ?? false;
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ class _PalmListPageState extends State<PalmListPage> with RouteAware {
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) async {
|
onPressed: (BuildContext context) async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ??
|
||||||
false;
|
false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -156,7 +156,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) async {
|
onPressed: (BuildContext context) async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ??
|
||||||
false;
|
false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -207,7 +207,7 @@ class _RemoteControlDetailPageState extends State<RemoteControlDetailPage> with
|
|||||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||||
onClick: () async {
|
onClick: () async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||||
if (isDemoMode == false) {
|
if (isDemoMode == false) {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
await logic.isConnected() ?? false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -144,7 +144,7 @@ class _RemoteControlListPageState extends State<RemoteControlListPage> with Rout
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (BuildContext context) async {
|
onPressed: (BuildContext context) async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ??
|
||||||
false;
|
false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class _MinePersonInfoResetPasswordPageState
|
|||||||
onClick: state.canSub.value
|
onClick: state.canSub.value
|
||||||
? () async {
|
? () async {
|
||||||
final bool isNetWork =
|
final bool isNetWork =
|
||||||
await LockMainLogic.to()?.judgeTheNetwork() ??
|
await logic.isConnected() ??
|
||||||
false;
|
false;
|
||||||
if (!isNetWork) {
|
if (!isNetWork) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user