添加指纹、卡、人脸、密码,删除/重置之前校验是否有网络功能
This commit is contained in:
parent
e18fa5c7e5
commit
2384d326ea
@ -1,8 +1,8 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/eventBusEventManage.dart';
|
||||
|
||||
@ -197,6 +197,8 @@ class _CardDetailPageState extends State<CardDetailPage> with RouteAware {
|
||||
margin: EdgeInsets.only(left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () async {
|
||||
state.isDeletCard.value = true;
|
||||
logic.senderAddICCard();
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_type.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import 'package:star_lock/tools/dateTool.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
||||
import '../../../../blue/io_protocol/io_checkingCardStatus.dart';
|
||||
import '../../../../blue/io_protocol/io_checkingUserInfoCount.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/card/cardList/cardList_state.dart';
|
||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||
|
||||
import '../../../../appRouters.dart';
|
||||
import '../../../../app_settings/app_colors.dart';
|
||||
@ -69,11 +69,8 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
onPressed: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
final bool isNetWork =
|
||||
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'重置后,该锁的卡都将被删除哦,确认要重置吗?'.tr, () async {
|
||||
state.isDeletAll = true;
|
||||
@ -145,6 +142,8 @@ class _CardListPageState extends State<CardListPage> with RouteAware {
|
||||
children: <Widget>[
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要删除吗?'.tr, () async {
|
||||
state.isDeletAll = false;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -77,7 +78,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
action: () async {
|
||||
if (state.keyType.value == 2 || state.keyType.value == 1) {
|
||||
// 限时
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeDatePage,
|
||||
arguments: <String, Object>{
|
||||
'pushType': 3,
|
||||
@ -92,7 +93,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
}
|
||||
} else if (state.keyType.value == 4) {
|
||||
// 循环
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: <String, Object>{
|
||||
'pushType': 3,
|
||||
@ -117,7 +118,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
isHaveDirection: true,
|
||||
isHaveLine: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: <String, Object>{
|
||||
'pushType': 3,
|
||||
@ -141,7 +142,7 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
'${DateTool().dateToHNString(state.startTime.value)}-${DateTool().dateToHNString(state.endTime.value)}',
|
||||
isHaveDirection: true,
|
||||
action: () async {
|
||||
var data = await Get.toNamed(
|
||||
final data = await Get.toNamed(
|
||||
Routers.otherTypeKeyChangeValidityDatePage,
|
||||
arguments: <String, Object>{
|
||||
'pushType': 3,
|
||||
@ -206,6 +207,8 @@ class _FaceDetailPageState extends State<FaceDetailPage> with RouteAware {
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr,
|
||||
() async {
|
||||
state.isDeletFace.value = true;
|
||||
|
||||
@ -4,13 +4,10 @@ import 'dart:async';
|
||||
import 'package:flutter_blue_plus/flutter_blue_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
||||
import 'package:star_lock/blue/io_protocol/io_queryingFaceStatus.dart';
|
||||
import 'package:star_lock/login/login/entity/LoginEntity.dart';
|
||||
import 'package:star_lock/main/lockDetail/face/faceList/faceList_state.dart';
|
||||
import 'package:star_lock/tools/baseGetXController.dart';
|
||||
import '../../../../app_settings/app_settings.dart';
|
||||
import '../../../../blue/blue_manage.dart';
|
||||
import '../../../../blue/io_protocol/io_checkingUserInfoCount.dart';
|
||||
import '../../../../blue/io_reply.dart';
|
||||
import '../../../../blue/io_tool/io_tool.dart';
|
||||
import '../../../../blue/io_tool/manager_event_bus.dart';
|
||||
@ -342,7 +339,7 @@ class FaceListLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
// 重置所有的人脸
|
||||
void clearAllFacesData() async {
|
||||
Future<void> clearAllFacesData() async {
|
||||
String faceId = '';
|
||||
String type = '1';
|
||||
if (state.isDeletAll == false) {
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
|
||||
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 'package:star_lock/main/lockDetail/face/faceList/faceList_state.dart';
|
||||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||
import 'package:star_lock/main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'package:star_lock/tools/keySearchWidget.dart';
|
||||
import 'package:star_lock/tools/left_slide/left_slide_actions.dart';
|
||||
import 'package:star_lock/tools/showTipView.dart';
|
||||
@ -27,14 +28,16 @@ class FaceListPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
final logic = Get.put(FaceListLogic());
|
||||
final state = Get.find<FaceListLogic>().state;
|
||||
final FaceListLogic logic = Get.put(FaceListLogic());
|
||||
final FaceListState state = Get.find<FaceListLogic>().state;
|
||||
|
||||
Future<void> getHttpData() async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
logic.getFaceListData().then((FingerprintListDataEntity value) {
|
||||
if (mounted) setState(() {});
|
||||
if (mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -55,32 +58,29 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
barTitle: TranslationLoader.lanKeys!.face!.tr,
|
||||
haveBack: true,
|
||||
backgroundColor: AppColors.mainColor,
|
||||
actionsList: [
|
||||
actionsList: <Widget>[
|
||||
TextButton(
|
||||
child: Text(
|
||||
TranslationLoader.lanKeys!.reset!.tr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 24.sp),
|
||||
),
|
||||
onPressed: () async {
|
||||
var isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
final bool isNetWork =
|
||||
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
// showDeletAlertDialog(context);
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
"重置后,该锁的人脸都将被删除哦,确认要重置吗?", () async {
|
||||
'重置后,该锁的人脸都将被删除哦,确认要重置吗?', () async {
|
||||
state.isDeletAll = true;
|
||||
state.deletKeyID = "1";
|
||||
state.deletKeyID = '1';
|
||||
state.deletFaceNo = 0;
|
||||
|
||||
logic.senderAddFace();
|
||||
});
|
||||
} else {
|
||||
// Get.toNamed(Routers.selectLockTypePage);
|
||||
logic.showToast("演示模式");
|
||||
logic.showToast('演示模式');
|
||||
}
|
||||
},
|
||||
),
|
||||
@ -95,7 +95,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
getHttpData();
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
KeySearchWidget(
|
||||
editingController: state.searchController,
|
||||
onSubmittedAction: () {
|
||||
@ -111,10 +111,10 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
btnName:
|
||||
'${TranslationLoader.lanKeys!.add!.tr}${TranslationLoader.lanKeys!.face!.tr}',
|
||||
onClick: () async {
|
||||
var data =
|
||||
await Get.toNamed(Routers.addFaceTypePage, arguments: {
|
||||
"lockId": state.lockId.value,
|
||||
"fromType": 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
final data =
|
||||
await Get.toNamed(Routers.addFaceTypePage, arguments: <String, int>{
|
||||
'lockId': state.lockId.value,
|
||||
'fromType': 1 // 1从添加钥匙列表进入 2从考勤添加员工入口进入
|
||||
});
|
||||
if (data != null) {
|
||||
logic.pageNo = 1;
|
||||
@ -134,8 +134,8 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
return Obx(() => state.faceItemListData.value.isNotEmpty
|
||||
? ListView.separated(
|
||||
itemCount: state.faceItemListData.value.length,
|
||||
itemBuilder: (c, index) {
|
||||
FingerprintItemData getFaceItemData =
|
||||
itemBuilder: (BuildContext c, int index) {
|
||||
final FingerprintItemData getFaceItemData =
|
||||
state.faceItemListData.value[index];
|
||||
// 人脸
|
||||
if (index < state.faceItemListData.value.length) {
|
||||
@ -143,7 +143,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
tag: getFaceItemData.faceName!,
|
||||
key: Key(getFaceItemData.faceName!),
|
||||
actionsWidth: 60,
|
||||
actions: [
|
||||
actions: <Widget>[
|
||||
_buildDeleteBtn(getFaceItemData),
|
||||
],
|
||||
decoration: const BoxDecoration(
|
||||
@ -154,9 +154,9 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
getFaceItemData.faceName!,
|
||||
logic.getKeyType(getFaceItemData),
|
||||
logic.getKeyDateType(getFaceItemData), () async {
|
||||
var data =
|
||||
await Get.toNamed(Routers.faceDetailPage, arguments: {
|
||||
"faceItemData": getFaceItemData,
|
||||
final data =
|
||||
await Get.toNamed(Routers.faceDetailPage, arguments: <String, FingerprintItemData>{
|
||||
'faceItemData': getFaceItemData,
|
||||
});
|
||||
if (data != null) {
|
||||
logic.pageNo = 1;
|
||||
@ -182,7 +182,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// 省略: 弹出是否删除的确认对话框。
|
||||
ShowTipView().showIosTipWithContentDialog("确定要删除吗?".tr, () async {
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () async {
|
||||
state.isDeletAll = false;
|
||||
state.deletKeyID = faceItemData.faceId.toString();
|
||||
state.deletFaceNo = int.parse(faceItemData.faceNumber!);
|
||||
@ -243,21 +243,21 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
// // borderRadius: BorderRadius.circular(10.w),
|
||||
// ),
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(width: 30.w),
|
||||
Image.asset(lockTypeIcon, width: 60.w, height: 60.w),
|
||||
SizedBox(width: 20.w),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
width: 1.sw - 110.w - 100.w,
|
||||
child: Row(
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(lockTypeTitle,
|
||||
maxLines: 1,
|
||||
@ -277,7 +277,7 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
SizedBox(height: 5.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
children: <Widget>[
|
||||
Flexible(
|
||||
child: Text(showTime,
|
||||
maxLines: 1,
|
||||
@ -301,7 +301,6 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
// TODO: implement didChangeDependencies
|
||||
super.didChangeDependencies();
|
||||
|
||||
/// 路由订阅
|
||||
@ -310,7 +309,6 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
/// 取消路由订阅
|
||||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||||
super.dispose();
|
||||
@ -328,7 +326,9 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
void didPop() {
|
||||
super.didPop();
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||
if (EasyLoading.isShow) {
|
||||
EasyLoading.dismiss(animation: true);
|
||||
}
|
||||
state.ifCurrentScreen.value = false;
|
||||
}
|
||||
|
||||
@ -344,7 +344,9 @@ class _FaceListPageState extends State<FaceListPage> with RouteAware {
|
||||
void didPushNext() {
|
||||
super.didPushNext();
|
||||
logic.cancelBlueConnetctToastTimer();
|
||||
if (EasyLoading.isShow) EasyLoading.dismiss(animation: true);
|
||||
if (EasyLoading.isShow) {
|
||||
EasyLoading.dismiss(animation: true);
|
||||
}
|
||||
state.ifCurrentScreen.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,21 +2,21 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/fingerprint/fingerprintList/fingerprintListData_entity.dart';
|
||||
|
||||
class FaceListState {
|
||||
final TextEditingController searchController = TextEditingController();
|
||||
final lockId = 0.obs;
|
||||
|
||||
// 因为删除跟添加人脸用的同一个协议 所以这里用做判断
|
||||
var isDeletAll = false;
|
||||
var deletKeyID = "";
|
||||
var deletFaceNo = 0;
|
||||
|
||||
final faceItemListData = <FingerprintItemData>[].obs;
|
||||
|
||||
var ifCurrentScreen = true.obs; // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
class FaceListState { // 是否是当前界面,用于判断是否需要针对当前界面进行展示
|
||||
|
||||
FaceListState() {
|
||||
Map map = Get.arguments;
|
||||
lockId.value = map["lockId"];
|
||||
lockId.value = map['lockId'];
|
||||
}
|
||||
final TextEditingController searchController = TextEditingController();
|
||||
final RxInt lockId = 0.obs;
|
||||
|
||||
// 因为删除跟添加人脸用的同一个协议 所以这里用做判断
|
||||
bool isDeletAll = false;
|
||||
String deletKeyID = '';
|
||||
int deletFaceNo = 0;
|
||||
|
||||
final RxList<FingerprintItemData> faceItemListData = <FingerprintItemData>[].obs;
|
||||
|
||||
RxBool ifCurrentScreen = true.obs;
|
||||
}
|
||||
|
||||
@ -211,6 +211,8 @@ class _FingerprintDetailPageState extends State<FingerprintDetailPage>
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr,
|
||||
() async {
|
||||
state.isDeletFingerprint.value = true;
|
||||
|
||||
@ -70,11 +70,8 @@ class _FingerprintListPageState extends State<FingerprintListPage>
|
||||
onPressed: () async {
|
||||
final bool? isDemoMode = await Storage.getBool(ifIsDemoModeOrNot);
|
||||
if (isDemoMode == false) {
|
||||
final bool isNetWork =
|
||||
LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'重置后,该锁的指纹都将被删除哦,确认要重置吗?'.tr, () async {
|
||||
state.isDeletAll = true;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:star_lock/main/lockDetail/passwordKey/passwordKeyDetail/passwordKeyDetail_logic.dart';
|
||||
@ -243,6 +243,8 @@ class _PasswordKeyDetailPageState extends State<PasswordKeyDetailPage>
|
||||
left: 30.w, right: 30.w, top: 30.w, bottom: 30.w),
|
||||
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
||||
onClick: () {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog('确定要删除吗?'.tr, () {
|
||||
state.isDeletPasswordKey.value = true;
|
||||
logic.senderCustomPasswords();
|
||||
|
||||
@ -307,12 +307,12 @@ class PasswordKeyListLogic extends BaseGetXController {
|
||||
}
|
||||
|
||||
// 获取用户信息此处用作判断网络是否能获取成功
|
||||
Future<void> getUserInfoRequest() async {
|
||||
final MinePersonInfoEntity entity = await ApiRepository.to.getUserInfo();
|
||||
if (entity.errorCode!.codeIsSuccessful) {
|
||||
senderResetPasswords();
|
||||
}
|
||||
}
|
||||
// Future<void> getUserInfoRequest() async {
|
||||
// final MinePersonInfoEntity entity = await ApiRepository.to.getUserInfo();
|
||||
// if (entity.errorCode!.codeIsSuccessful) {
|
||||
// senderResetPasswords();
|
||||
// }
|
||||
// }
|
||||
|
||||
//使用期限
|
||||
String getUseDateStr(PasswordKeyListItem indexEntity) {
|
||||
|
||||
@ -78,7 +78,7 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
return;
|
||||
}
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'该锁的密码都将被删除'.tr, logic.getUserInfoRequest);
|
||||
'该锁的密码都将被删除'.tr, logic.senderResetPasswords);
|
||||
} else {
|
||||
logic.showToast('演示模式'.tr);
|
||||
}
|
||||
@ -155,6 +155,8 @@ class _PasswordKeyListPageState extends State<PasswordKeyListPage>
|
||||
children: <Widget>[
|
||||
SlidableAction(
|
||||
onPressed: (BuildContext context) {
|
||||
logic.checkNetworkSituation();
|
||||
|
||||
ShowTipView().showIosTipWithContentDialog(
|
||||
'确定要删除吗?'.tr, () async {
|
||||
state.itemData = passwordKeyListItem;
|
||||
|
||||
@ -110,6 +110,8 @@ class LockMainLogic extends BaseGetXController {
|
||||
// 从无网络到有网络
|
||||
state.networkConnectionStatus.value = 1;
|
||||
getStarLockInfo(isUnShowLoading: true);
|
||||
}else if(result == ConnectivityResult.none){
|
||||
state.networkConnectionStatus.value = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import 'package:system_settings/system_settings.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../common/XSConstantMacro/XSConstantMacro.dart';
|
||||
import '../main/lockMian/lockMain/lockMain_logic.dart';
|
||||
import 'NativeInteractionTool.dart';
|
||||
import 'dateTool.dart';
|
||||
import 'manager/client_manager.dart';
|
||||
@ -176,6 +177,13 @@ class BaseGetXController extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
void checkNetworkSituation (){
|
||||
final bool isNetWork = LockMainLogic.to()?.judgeTheNetwork() ?? false;
|
||||
if (!isNetWork) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String getUseKeyTypeStr(int? startDate, int? endDate, int? keyType) {
|
||||
String useDateStr = '';
|
||||
if (keyType == XSConstantMacro.keyTypeTime) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user