1314 lines
44 KiB
Dart
1314 lines
44 KiB
Dart
import 'dart:async';
|
||
|
||
import 'package:colorfilter_generator/addons.dart';
|
||
import 'package:colorfilter_generator/colorfilter_generator.dart';
|
||
import 'package:colorfilter_generator/presets.dart';
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
import 'package:get/get.dart';
|
||
import 'package:intl/intl.dart';
|
||
import 'package:star_lock/flavors.dart';
|
||
import 'package:star_lock/tools/showTipView.dart';
|
||
import 'package:star_lock/widget/flavors_img.dart';
|
||
|
||
import '../../../appRouters.dart';
|
||
import '../../../app_settings/app_colors.dart';
|
||
import '../../../blue/blue_manage.dart';
|
||
import '../../../blue/io_tool/io_tool.dart';
|
||
import '../../../common/XSConstantMacro/XSConstantMacro.dart';
|
||
import '../../../tools/appRouteObserver.dart';
|
||
import '../../../tools/commonDataManage.dart';
|
||
import '../../../tools/dateTool.dart';
|
||
import '../../../tools/eventBusEventManage.dart';
|
||
import '../../../tools/storage.dart';
|
||
import '../../../translations/trans_lib.dart';
|
||
import '../../lockMian/entity/lockListInfo_entity.dart';
|
||
import 'lockDetail_logic.dart';
|
||
|
||
class LockDetailPage extends StatefulWidget {
|
||
final bool isOnlyOneData;
|
||
final LockListInfoItemEntity lockListInfoItemEntity;
|
||
|
||
const LockDetailPage(
|
||
{Key? key,
|
||
required this.isOnlyOneData,
|
||
required this.lockListInfoItemEntity})
|
||
: super(key: key);
|
||
|
||
@override
|
||
State<LockDetailPage> createState() => _LockDetailPageState();
|
||
}
|
||
|
||
class _LockDetailPageState extends State<LockDetailPage>
|
||
with TickerProviderStateMixin, RouteAware {
|
||
// with RouteAware
|
||
final logic = Get.put(LockDetailLogic());
|
||
final state = Get.find<LockDetailLogic>().state;
|
||
|
||
@override
|
||
void initState() {
|
||
// TODO: implement initState
|
||
super.initState();
|
||
|
||
print("openDoor:${DateTool().accordingTheCycleIntoTheCorrespondingNumber([5])}");
|
||
print("onLine:${DateTool().accordingTheCycleIntoTheCorrespondingNumber([1])}");
|
||
// logic.startScanAction();
|
||
|
||
listeningAnimations();
|
||
|
||
state.pageController.addListener(() {
|
||
state.currentPage.value = state.pageController.page!.round();
|
||
});
|
||
|
||
_initRefreshLockDetailInfoDataEventAction();
|
||
logic.initReplySubscription();
|
||
logic.initLockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceAction();
|
||
}
|
||
|
||
@override
|
||
void didChangeDependencies() {
|
||
super.didChangeDependencies();
|
||
|
||
/// 路由订阅
|
||
AppRouteObserver().routeObserver.subscribe(this, ModalRoute.of(context)!);
|
||
}
|
||
|
||
StreamSubscription? _lockRefreshLockDetailInfoDataEvent;
|
||
|
||
void _initRefreshLockDetailInfoDataEventAction() {
|
||
// 蓝牙协议通知传输跟蓝牙之外的数据传输类不一样 eventBus
|
||
_lockRefreshLockDetailInfoDataEvent =
|
||
eventBus.on<RefreshLockDetailInfoDataEvent>().listen((event) {
|
||
setState(() {});
|
||
});
|
||
}
|
||
|
||
void loadData() {
|
||
state.keyInfos.value = widget.lockListInfoItemEntity;
|
||
CommonDataManage().currentLockUserNo = state.keyInfos.value.lockUserNo!;
|
||
CommonDataManage().currentKeyInfo = state.keyInfos.value;
|
||
|
||
state.lockUserNo = state.keyInfos.value.lockUserNo!;
|
||
|
||
// if (state.lockUserNo == 0) {
|
||
// state.bottomBtnisEable.value = false;
|
||
// } else {
|
||
// state.bottomBtnisEable.value = true;
|
||
// }
|
||
|
||
// print("state.keyInfos.value.keyStatus:${state.keyInfos.value.keyStatus}");
|
||
if (state.keyInfos.value.keyStatus ==
|
||
XSConstantMacro.keyStatusWaitIneffective ||
|
||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusFrozen ||
|
||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusExpired ||
|
||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusDeleted ||
|
||
state.keyInfos.value.keyStatus == XSConstantMacro.keyStatusReset) {
|
||
state.openDoorBtnisUneable.value = false;
|
||
} else {
|
||
state.openDoorBtnisUneable.value = true;
|
||
}
|
||
|
||
state.isOnlyOneData = widget.isOnlyOneData;
|
||
// print("state.lockUserNo==${state.lockUserNo}");
|
||
state.senderUserId = state.keyInfos.value.senderUserId!;
|
||
state.isAttendance.value = state.keyInfos.value.lockSetting!.attendance!;
|
||
state.isOpenLockNeedOnline.value =
|
||
state.keyInfos.value.lockSetting!.appUnlockOnline!;
|
||
state.electricQuantity.value = state.keyInfos.value.electricQuantity!;
|
||
state.isOpenPassageMode.value = state.keyInfos.value.passageMode!;
|
||
state.lockAlias.value = state.keyInfos.value.lockAlias!;
|
||
Storage.setString(saveLockAlias, state.lockAlias.value);
|
||
|
||
BlueManage().connectDeviceName =
|
||
state.keyInfos.value.bluetooth!.bluetoothDeviceName!;
|
||
|
||
List<int> publicKeyData =
|
||
state.keyInfos.value.bluetooth!.publicKey!.cast<int>();
|
||
var saveStrList = changeIntListToStringList(publicKeyData);
|
||
Storage.setStringList(saveBluePublicKey, saveStrList);
|
||
|
||
// 私钥
|
||
List<int> privateKeyData =
|
||
state.keyInfos.value.bluetooth!.privateKey!.cast<int>();
|
||
var savePrivateKeyList = changeIntListToStringList(privateKeyData);
|
||
Storage.setStringList(saveBluePrivateKey, savePrivateKeyList);
|
||
|
||
// signKey
|
||
List<int> signKeyData =
|
||
state.keyInfos.value.bluetooth!.signKey!.cast<int>();
|
||
var saveSignKeyList = changeIntListToStringList(signKeyData);
|
||
Storage.setStringList(saveBlueSignKey, saveSignKeyList);
|
||
|
||
var saveTokenList = changeIntListToStringList([0, 0, 0, 0]);
|
||
Storage.setStringList(saveBlueToken, saveTokenList);
|
||
}
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
state.widgetContext = context;
|
||
loadData();
|
||
return F.sw(defaultCall: () => skWidget(), xhjCall: () => xhjWidget());
|
||
}
|
||
|
||
//鑫泓佳布局
|
||
Widget xhjWidget() {
|
||
return Scaffold(
|
||
backgroundColor: Colors.white,
|
||
body: SingleChildScrollView(
|
||
child: Obx(() {
|
||
return Column(
|
||
children: [
|
||
SizedBox(
|
||
height: 45.h,
|
||
),
|
||
infoView(),
|
||
SizedBox(
|
||
height: 35.h,
|
||
),
|
||
labelGridView('功能'.tr, getBottomWidget()),
|
||
labelListView('配件'.tr, getAttachmentWidget()),
|
||
SizedBox(
|
||
height: 45.h,
|
||
),
|
||
Padding(
|
||
padding: EdgeInsets.only(left: 52.w, right: 52.w),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
buttonView('关锁'.tr, () {
|
||
if (state.openDoorBtnisUneable.value == true) {
|
||
startUnLock();
|
||
}
|
||
}),
|
||
buttonView('开锁'.tr, () {
|
||
if (state.openDoorBtnisUneable.value == true) {
|
||
startOpenLock();
|
||
}
|
||
}),
|
||
],
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}),
|
||
),
|
||
);
|
||
}
|
||
|
||
//斯凯布局
|
||
Widget skWidget() {
|
||
return ListView(
|
||
children: [
|
||
Visibility(
|
||
visible:
|
||
((state.keyInfos.value.keyType == XSConstantMacro.keyTypeTime ||
|
||
state.keyInfos.value.keyType ==
|
||
XSConstantMacro.keyTypeLoop) && // 限时、循环
|
||
(DateTool().compareTimeGetDaysFromNow(
|
||
state.keyInfos.value.endDate!) <=
|
||
15 &&
|
||
DateTool().compareTimeGetDaysFromNow(
|
||
state.keyInfos.value.endDate!) >=
|
||
0) && // 0到30天
|
||
(state.keyInfos.value.keyStatus ==
|
||
XSConstantMacro.keyStatusNormalUse ||
|
||
state.keyInfos.value.keyStatus ==
|
||
XSConstantMacro.keyStatusWaitReceive) // 正常使用、待接收
|
||
)
|
||
? true
|
||
: false,
|
||
child: Container(
|
||
// height: 30.h,
|
||
color: const Color(0xFFFBEFD4),
|
||
padding: EdgeInsets.only(top: 8.h, bottom: 8.h),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Text(
|
||
"${"钥匙将在".tr}${DateTool().compareTimeGetDaysFromNow(state.keyInfos.value.endDate!)}${"天后失效".tr}",
|
||
style: TextStyle(
|
||
color: const Color(0xffCBA74B), fontSize: 24.sp))
|
||
],
|
||
),
|
||
),
|
||
),
|
||
Stack(children: [
|
||
Container(
|
||
width: 1.sw,
|
||
height: 1.sh - ScreenUtil().statusBarHeight,
|
||
color: Colors.white,
|
||
child: Column(
|
||
children: [
|
||
topWidget(),
|
||
SizedBox(
|
||
height: 10.h,
|
||
),
|
||
Obx(() => buildPageIndicator()),
|
||
Expanded(
|
||
child: Container(
|
||
margin: EdgeInsets.only(left: 10.w, right: 10.w, top: 30.h),
|
||
child: PageView(
|
||
scrollDirection: Axis.horizontal,
|
||
controller: state.pageController,
|
||
children: [
|
||
Obx(() => bottomWidget()),
|
||
attachmentWidget(),
|
||
],
|
||
),
|
||
)),
|
||
],
|
||
),
|
||
),
|
||
Visibility(
|
||
visible: state.iSClosedUnlockSuccessfulPopup.value,
|
||
// visible: true,
|
||
child: GestureDetector(
|
||
onTap: () {
|
||
setState(() {
|
||
state.iSClosedUnlockSuccessfulPopup.value = false;
|
||
});
|
||
},
|
||
child: Container(
|
||
width: 1.sw,
|
||
height: 1.sh - ScreenUtil().statusBarHeight * 2,
|
||
color: Colors.black.withOpacity(0.3),
|
||
child: _unlockSuccessWidget()),
|
||
),
|
||
)
|
||
]),
|
||
],
|
||
);
|
||
}
|
||
|
||
//操作锁按钮
|
||
Widget buttonView(String text, VoidCallback? onPressed) {
|
||
bool openLockBtnState = state.openLockBtnState.value != 0;
|
||
return ElevatedButton(
|
||
onPressed: openLockBtnState ? null : onPressed,
|
||
style: ElevatedButton.styleFrom(
|
||
backgroundColor: openLockBtnState
|
||
? AppColors.mainBackgroundColor
|
||
: AppColors.mainColor,
|
||
shape: RoundedRectangleBorder(
|
||
// 设置按钮的形状
|
||
borderRadius: BorderRadius.circular(8), // 圆角的大小
|
||
)),
|
||
child: SizedBox(
|
||
height: 0.12.sh,
|
||
width: 0.12.sh,
|
||
child: Center(
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.min,
|
||
children: [
|
||
Text(
|
||
text,
|
||
style: TextStyle(
|
||
color:
|
||
openLockBtnState ? AppColors.mainColor : Colors.white),
|
||
),
|
||
if (openLockBtnState)
|
||
Container(
|
||
margin: EdgeInsets.only(left: 15.w),
|
||
width: 15.r,
|
||
height: 15.r,
|
||
child: CircularProgressIndicator(
|
||
strokeWidth: 3.5,
|
||
color: AppColors.mainColor,
|
||
),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget infoView() {
|
||
return Padding(
|
||
padding: EdgeInsets.only(left: 35.w, right: 10.w),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Column(
|
||
mainAxisSize: MainAxisSize.min,
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Text(
|
||
state.lockAlias.value,
|
||
style: TextStyle(
|
||
fontSize: 28.sp,
|
||
fontWeight: FontWeight.w400,
|
||
color: state.isOpenPassageMode.value == 1
|
||
? AppColors.openPassageModeColor
|
||
: AppColors.darkGrayTextColor),
|
||
),
|
||
SizedBox(
|
||
height: 15.h,
|
||
),
|
||
adminInfoView(center: false, max: false),
|
||
],
|
||
),
|
||
Column(
|
||
mainAxisSize: MainAxisSize.min,
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.end,
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
showElectricIcon(state.electricQuantity.value),
|
||
width: 30.w,
|
||
height: 24.w),
|
||
),
|
||
SizedBox(width: 2.w),
|
||
Text("${state.electricQuantity.value}%",
|
||
style: TextStyle(
|
||
fontSize: 18.sp, color: AppColors.darkGrayTextColor)),
|
||
SizedBox(width: 2.w),
|
||
FlavorsImg(
|
||
child: Icon(
|
||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||
color: AppColors.mainColor, // 设置图标颜色为红色
|
||
size: 25.w, // 设置图标大小为 30
|
||
),
|
||
),
|
||
SizedBox(width: 20.w),
|
||
],
|
||
),
|
||
SizedBox(
|
||
height: 15.h,
|
||
),
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.end,
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
showElectricIcon(state.electricQuantity.value),
|
||
width: 30.w,
|
||
height: 24.w),
|
||
),
|
||
SizedBox(width: 2.w),
|
||
Text("--%",
|
||
style: TextStyle(
|
||
fontSize: 18.sp, color: AppColors.darkGrayTextColor)),
|
||
SizedBox(width: 2.w),
|
||
FlavorsImg(
|
||
child: Icon(
|
||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||
color: AppColors.mainColor, // 设置图标颜色为红色
|
||
size: 25.w, // 设置图标大小为 30
|
||
),
|
||
),
|
||
SizedBox(width: 20.w),
|
||
],
|
||
)
|
||
],
|
||
)
|
||
],
|
||
),
|
||
);
|
||
}
|
||
|
||
//带标签的 GridView 布局
|
||
Widget labelGridView(String text, List<Widget> children) {
|
||
return Column(
|
||
children: [
|
||
Align(
|
||
alignment: Alignment.topLeft,
|
||
child: Padding(
|
||
padding: EdgeInsets.only(
|
||
left: 40.w,
|
||
top: 20.h,
|
||
bottom: 20.h,
|
||
),
|
||
child: Text(text))),
|
||
SizedBox(
|
||
height: 200.h,
|
||
child: Row(
|
||
children: [
|
||
Expanded(
|
||
child: GridView.count(
|
||
padding: EdgeInsets.only(left: 15.w, right: 15.w),
|
||
crossAxisCount: 2,
|
||
childAspectRatio: 0.7,
|
||
crossAxisSpacing: 25.h,
|
||
mainAxisSpacing: 25.w,
|
||
scrollDirection: Axis.horizontal,
|
||
children: children),
|
||
),
|
||
Padding(
|
||
padding: EdgeInsets.only(left: 0.w, right: 4.w),
|
||
child: const Icon(Icons.arrow_forward_ios_rounded),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
//带标签的 ListView 布局
|
||
Widget labelListView(String text, List<Widget> children) {
|
||
return Column(
|
||
children: [
|
||
Align(
|
||
alignment: Alignment.topLeft,
|
||
child: Padding(
|
||
padding: EdgeInsets.only(
|
||
left: 40.w,
|
||
top: 20.h,
|
||
bottom: 20.h,
|
||
),
|
||
child: Text(text))),
|
||
SizedBox(
|
||
height: 100.h,
|
||
child: Row(
|
||
children: [
|
||
Expanded(
|
||
child: GridView.count(
|
||
padding: EdgeInsets.only(left: 15.w, right: 15.w),
|
||
crossAxisCount: 1,
|
||
childAspectRatio: 0.7,
|
||
crossAxisSpacing: 25.h,
|
||
mainAxisSpacing: 25.w,
|
||
scrollDirection: Axis.horizontal,
|
||
children: children),
|
||
),
|
||
Padding(
|
||
padding: EdgeInsets.only(left: 0.w, right: 4.w),
|
||
child: Icon(Icons.arrow_forward_ios_rounded),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
Widget topWidget() {
|
||
return Column(
|
||
children: [
|
||
F.sw(
|
||
defaultCall: () => SizedBox(height: 50.h),
|
||
xhjCall: () => Padding(
|
||
padding: EdgeInsets.only(
|
||
top: 12.h,
|
||
left: 15.w,
|
||
bottom: 16.h,
|
||
right: 15.w,
|
||
),
|
||
child: adminInfoView(center: false, add: true),
|
||
),
|
||
),
|
||
Stack(
|
||
children: [
|
||
Center(
|
||
child: Text(
|
||
state.lockAlias.value,
|
||
style: TextStyle(
|
||
fontSize: 22.sp,
|
||
fontWeight: FontWeight.w400,
|
||
color: state.isOpenPassageMode.value == 1
|
||
? AppColors.openPassageModeColor
|
||
: AppColors.darkGrayTextColor),
|
||
)),
|
||
Positioned(
|
||
child: Column(
|
||
mainAxisSize: MainAxisSize.min,
|
||
children: [
|
||
GestureDetector(
|
||
onTap: () {
|
||
// logic.getStarLockStatus();
|
||
ShowTipView().showSureAlertDialog(
|
||
"${"锁更新时间:".tr}${DateTool().dateToYMDHNString(state.keyInfos.value.electricQuantityDate!.toString())}");
|
||
},
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.end,
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
showElectricIcon(state.electricQuantity.value),
|
||
width: 30.w,
|
||
height: 24.w),
|
||
),
|
||
SizedBox(width: 2.w),
|
||
Text("${state.electricQuantity.value}%",
|
||
style: TextStyle(
|
||
fontSize: 18.sp,
|
||
color: AppColors.darkGrayTextColor)),
|
||
SizedBox(width: 2.w),
|
||
FlavorsImg(
|
||
child: Icon(
|
||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||
color: AppColors.mainColor, // 设置图标颜色为红色
|
||
size: 25.w, // 设置图标大小为 30
|
||
),
|
||
),
|
||
SizedBox(width: 20.w),
|
||
],
|
||
),
|
||
),
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.end,
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
showElectricIcon(state.electricQuantity.value),
|
||
width: 30.w,
|
||
height: 24.w),
|
||
),
|
||
SizedBox(width: 2.w),
|
||
Text("--%",
|
||
style: TextStyle(
|
||
fontSize: 18.sp,
|
||
color: AppColors.darkGrayTextColor)),
|
||
SizedBox(width: 2.w),
|
||
FlavorsImg(
|
||
child: Icon(
|
||
Icons.info, // 使用内置的 warning 图标,它是一个叹号
|
||
color: AppColors.mainColor, // 设置图标颜色为红色
|
||
size: 25.w, // 设置图标大小为 30
|
||
),
|
||
),
|
||
SizedBox(width: 20.w),
|
||
],
|
||
),
|
||
],
|
||
))
|
||
],
|
||
),
|
||
F.sw(
|
||
defaultCall: () => SizedBox(height: 30.h),
|
||
xhjCall: () => SizedBox(height: 15.h),
|
||
),
|
||
Container(
|
||
// width: 1.sw,
|
||
color: Colors.white,
|
||
height: 330.w,
|
||
child: Stack(
|
||
children: [
|
||
Center(
|
||
child: GestureDetector(
|
||
onTap: state.openDoorBtnisUneable.value == true
|
||
? () {
|
||
// Get.log("点击开锁");
|
||
setState(() {
|
||
startOpenLock();
|
||
});
|
||
}
|
||
: null,
|
||
onLongPressStart: state.openDoorBtnisUneable.value == true
|
||
? (details) {
|
||
// Get.log("长按闭锁");
|
||
setState(() {
|
||
startUnLock();
|
||
});
|
||
}
|
||
: null,
|
||
child: Stack(
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
state.openDoorBtnisUneable.value == false
|
||
? 'images/main/icon_main_openLockBtn_grey.png'
|
||
: (state.isOpenPassageMode.value == 1
|
||
? 'images/main/icon_main_normallyOpenMode_center.png'
|
||
: 'images/main/icon_main_openLockBtn_center.png'),
|
||
width: 330.w,
|
||
height: 330.w,
|
||
// color: AppColors.primaryTopColor,
|
||
),
|
||
),
|
||
state.openDoorBtnisUneable.value == false
|
||
? Positioned(
|
||
child: FlavorsImg(
|
||
child: Image.asset(
|
||
'images/main/icon_main_openLockBtn_grey.png',
|
||
width: 330.w,
|
||
height: 330.w,
|
||
),
|
||
),
|
||
)
|
||
: state.openLockBtnState.value == 1
|
||
? buildRotationTransition()
|
||
: Positioned(
|
||
child: FlavorsImg(
|
||
child: Image.asset(
|
||
state.isOpenPassageMode.value == 1
|
||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
||
: 'images/main/icon_main_openLockBtn_circle.png',
|
||
width: 330.w,
|
||
height: 330.w,
|
||
),
|
||
)),
|
||
],
|
||
),
|
||
)),
|
||
],
|
||
),
|
||
),
|
||
SizedBox(
|
||
height: 30.h,
|
||
),
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Text(
|
||
logic.getKeyStatusTextAndShow(),
|
||
style: TextStyle(
|
||
fontSize: 22.sp,
|
||
color: AppColors.btnDisableColor,
|
||
fontWeight: FontWeight.w500),
|
||
),
|
||
],
|
||
),
|
||
SizedBox(
|
||
height: 30.h,
|
||
),
|
||
F.sw(defaultCall: () => adminInfoView(), xhjCall: () => SizedBox()),
|
||
SizedBox(
|
||
height: 20.h,
|
||
),
|
||
Divider(
|
||
height: 1,
|
||
color: AppColors.greyLineColor,
|
||
indent: 20.w,
|
||
endIndent: 20.w,
|
||
)
|
||
],
|
||
);
|
||
}
|
||
|
||
Widget adminInfoView(
|
||
{bool center = true, bool max = true, bool add = false}) {
|
||
return Row(
|
||
mainAxisAlignment:
|
||
center ? MainAxisAlignment.center : MainAxisAlignment.start,
|
||
mainAxisSize: max ? MainAxisSize.max : MainAxisSize.min,
|
||
children: [
|
||
Image.asset(
|
||
'images/icon_electronicKey_admin.png',
|
||
width: 24.w,
|
||
height: 20.w,
|
||
color: AppColors.blackColor, //应根据状态显示(当前角色为超级管理员 应显示蓝色图标)
|
||
),
|
||
SizedBox(width: 6.w),
|
||
Text(
|
||
state.keyInfos.value.isLockOwner == 1
|
||
? TranslationLoader.lanKeys!.superAdmin!.tr
|
||
: (state.keyInfos.value.keyRight == 1
|
||
? TranslationLoader.lanKeys!.authorizedAdmin!.tr
|
||
: TranslationLoader.lanKeys!.normalUser!.tr),
|
||
style: TextStyle(fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||
),
|
||
if (add) SizedBox(width: 20.w) else SizedBox(width: 80.w),
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
state.keyInfos.value.remoteEnable == 1
|
||
? 'images/main/icon_main_remoteUnlocking.png'
|
||
: 'images/main/icon_main_remoteUnlocking_grey.png',
|
||
width: 24.w,
|
||
height: 20.w,
|
||
),
|
||
),
|
||
SizedBox(width: 6.w),
|
||
Text(
|
||
TranslationLoader.lanKeys!.gatewayDevice!.tr,
|
||
style: TextStyle(
|
||
fontSize: 20.sp,
|
||
color: state.keyInfos.value.remoteEnable == 1
|
||
? AppColors.mainColor
|
||
: AppColors.btnDisableColor),
|
||
),
|
||
if (add) ...[
|
||
const Spacer(),
|
||
GestureDetector(
|
||
onTap: () {
|
||
Get.toNamed(Routers.selectLockTypePage);
|
||
},
|
||
child: Padding(
|
||
padding: const EdgeInsets.all(8.0),
|
||
child: Row(
|
||
mainAxisSize: MainAxisSize.min,
|
||
children: [
|
||
FlavorsImg(
|
||
child: Image.asset(
|
||
'images/mine/icon_mine_main_addLock.png',
|
||
width: 24.w,
|
||
height: 20.w,
|
||
),
|
||
),
|
||
Text(
|
||
TranslationLoader.lanKeys!.addDevice!.tr,
|
||
style: TextStyle(
|
||
fontSize: 20.sp, color: AppColors.darkGrayTextColor),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
),
|
||
]
|
||
],
|
||
);
|
||
}
|
||
|
||
//旋转动画
|
||
Widget buildRotationTransition() {
|
||
return Positioned(
|
||
child: RotationTransition(
|
||
//设置动画的旋转中心
|
||
alignment: Alignment.center,
|
||
//动画控制器
|
||
turns: state.animationController!,
|
||
//将要执行动画的子view
|
||
child: FlavorsImg(
|
||
child: Image.asset(
|
||
state.isOpenPassageMode.value == 1
|
||
? 'images/main/icon_main_normallyOpenMode_circle.png'
|
||
: 'images/main/icon_main_openLockBtn_circle.png',
|
||
width: 330.w,
|
||
height: 330.w,
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
//圆点指示器
|
||
Widget buildPageIndicator() {
|
||
return Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: List.generate(2, (index) {
|
||
return Container(
|
||
width: 10.0.w,
|
||
height: 10.0.w,
|
||
margin: EdgeInsets.symmetric(vertical: 10.0.w, horizontal: 6.0.w),
|
||
decoration: BoxDecoration(
|
||
shape: BoxShape.circle,
|
||
color: state.currentPage.value == index
|
||
? AppColors.mainColor
|
||
: Colors.grey,
|
||
),
|
||
);
|
||
}),
|
||
);
|
||
}
|
||
|
||
//配件区域
|
||
Widget attachmentWidget() {
|
||
return SizedBox(
|
||
width: ScreenUtil().screenWidth - 20.w,
|
||
child: GridView.count(
|
||
crossAxisCount: 4,
|
||
// childAspectRatio: 3,
|
||
crossAxisSpacing: 20.w,
|
||
mainAxisSpacing: 0.h,
|
||
physics: const NeverScrollableScrollPhysics(),
|
||
children: getAttachmentWidget()),
|
||
);
|
||
}
|
||
|
||
// 配件配置
|
||
List<Widget> getAttachmentWidget() {
|
||
var showWidgetArr = <Widget>[];
|
||
// 无线键盘
|
||
// if (state.isAttendance.value == 1) {
|
||
// showWidgetArr.add(bottomItem(
|
||
// 'images/main/icon_lockDetail_WirelessKeyboard.png',
|
||
// '无线键盘',
|
||
// state.bottomBtnisUneable.value,
|
||
// () {}));
|
||
// }
|
||
// // 照明
|
||
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||
// '照明', state.bottomBtnisUneable.value, () {}));
|
||
|
||
// // 照明
|
||
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||
// '门磁', state.bottomBtnisUneable.value, () {}));
|
||
|
||
// // 门磁
|
||
// showWidgetArr.add(bottomItem('images/main/icon_lockDetail_illuminator.png',
|
||
// '开门器', state.bottomBtnisUneable.value, () {}));
|
||
|
||
// 新增配件
|
||
showWidgetArr.add(bottomItem('images/main/icon_main_addLock.png', '新增配件'.tr,
|
||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||
Navigator.pushNamed(context, Routers.accessoriesListPage);
|
||
}));
|
||
|
||
return showWidgetArr;
|
||
}
|
||
|
||
Widget bottomWidget() {
|
||
return SizedBox(
|
||
width: ScreenUtil().screenWidth - 20.w,
|
||
child: GridView.count(
|
||
crossAxisCount: 4,
|
||
// childAspectRatio: 3,
|
||
crossAxisSpacing: 25.h,
|
||
mainAxisSpacing: 0.h,
|
||
physics: const NeverScrollableScrollPhysics(),
|
||
children: getBottomWidget()),
|
||
);
|
||
}
|
||
|
||
// 根据权限显示不同的底部按钮
|
||
List<Widget> getBottomWidget() {
|
||
if (state.keyInfos.value.isLockOwner == 1 ||
|
||
state.keyInfos.value.keyRight == 1) {
|
||
// 超级管理员、授权管理员
|
||
return getAllWidget();
|
||
} else {
|
||
return getNormalWidget();
|
||
}
|
||
}
|
||
|
||
// 普通用户
|
||
List<Widget> getNormalWidget() {
|
||
List<Widget> showWidgetArr = <Widget>[];
|
||
// 考勤
|
||
if (state.isAttendance.value == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_clockingIn.png',
|
||
TranslationLoader.lanKeys!.checkingIn!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.checkingInListPage,
|
||
arguments: state.keyInfos.value);
|
||
}));
|
||
}
|
||
// 操作记录
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_operatingRecord.png',
|
||
TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.lockOperatingRecordPage,
|
||
arguments: {"keyInfo": state.keyInfos.value});
|
||
}));
|
||
|
||
// 设置
|
||
showWidgetArr.add(bottomItem('images/main/icon_main_set.png',
|
||
TranslationLoader.lanKeys!.set!.tr, true, true, () {
|
||
Get.toNamed(Routers.lockSetPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
"isOnlyOneData": state.isOnlyOneData
|
||
});
|
||
}));
|
||
|
||
return showWidgetArr;
|
||
}
|
||
|
||
// 授权管理员、超级管理员字段
|
||
List<Widget> getAllWidget() {
|
||
var showWidgetArr = <Widget>[];
|
||
// 考勤
|
||
if (state.isAttendance.value == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_clockingIn.png',
|
||
TranslationLoader.lanKeys!.checkingIn!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.checkingInListPage,
|
||
arguments: state.keyInfos.value);
|
||
}));
|
||
}
|
||
|
||
// 电子钥匙
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_electronicKey.png',
|
||
TranslationLoader.lanKeys!.electronicKey!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.electronicKeyListPage,
|
||
arguments: {"keyInfo": state.keyInfos.value});
|
||
}));
|
||
|
||
// 密码
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_password.png',
|
||
TranslationLoader.lanKeys!.password!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.passwordKeyListPage,
|
||
arguments: {"keyInfo": state.keyInfos.value});
|
||
}));
|
||
|
||
// ic卡
|
||
if (state.keyInfos.value.lockFeature!.icCard == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_icCard.png',
|
||
TranslationLoader.lanKeys!.card!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.cardListPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}));
|
||
}
|
||
|
||
// 指纹
|
||
if (state.keyInfos.value.lockFeature!.fingerprint == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_fingerprint.png',
|
||
TranslationLoader.lanKeys!.fingerprint!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.fingerprintListPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}));
|
||
}
|
||
|
||
// 遥控
|
||
if (state.keyInfos.value.lockFeature!.bluetoothRemoteControl == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_remoteControl.png',
|
||
TranslationLoader.lanKeys!.remoteControl!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.remoteControlListPage);
|
||
}));
|
||
}
|
||
|
||
//可视对讲门锁新增->人脸
|
||
if (state.keyInfos.value.lockFeature!.d3Face == 1) {
|
||
showWidgetArr.add(
|
||
bottomItem(
|
||
'images/main/icon_face.png',
|
||
TranslationLoader.lanKeys!.humanFace!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.faceListPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}),
|
||
);
|
||
}
|
||
|
||
if (state.keyInfos.value.lockFeature!.isSupportIris == 1) {
|
||
showWidgetArr.add(
|
||
bottomItem('images/main/icon_iris.png', '虹膜'.tr,
|
||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.irisListPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}),
|
||
);
|
||
}
|
||
|
||
if (state.keyInfos.value.lockFeature!.palmVein == 1) {
|
||
showWidgetArr.add(
|
||
bottomItem('images/main/icon_palm.png', '手掌'.tr,
|
||
state.openDoorBtnisUneable.value, state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.palmListPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}),
|
||
);
|
||
}
|
||
|
||
//可视对讲门锁新增->监控
|
||
if (state.keyInfos.value.lockFeature!.videoIntercom == 1) {
|
||
showWidgetArr.add(
|
||
bottomItem(
|
||
'images/main/icon_catEyes.png',
|
||
TranslationLoader.lanKeys!.monitoring!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.realTimePicturePage, arguments: {
|
||
"lockName": state.keyInfos.value.lockName,
|
||
"isMonitoring": true
|
||
});
|
||
}),
|
||
);
|
||
}
|
||
|
||
// 授权管理员
|
||
if (state.keyInfos.value.isLockOwner == 1) {
|
||
showWidgetArr.add(bottomItem(
|
||
'images/main/icon_main_authorizedAdmin.png',
|
||
TranslationLoader.lanKeys!.authorizedAdmin!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.authorizedAdminListPage,
|
||
arguments: {"keyInfo": state.keyInfos.value});
|
||
}));
|
||
}
|
||
|
||
var endWiddget = <Widget>[];
|
||
endWiddget.add(
|
||
// 操作记录
|
||
bottomItem(
|
||
'images/main/icon_main_operatingRecord.png',
|
||
TranslationLoader.lanKeys!.operatingRecord!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
// Get.toNamed(Routers.lockOperatingRecordPage,
|
||
// arguments: {"keyInfo": state.keyInfos.value});
|
||
Get.toNamed(Routers.doorLockLogPage,
|
||
arguments: {"keyInfo": state.keyInfos.value});
|
||
}),
|
||
);
|
||
|
||
if (state.keyInfos.value.lockFeature!.d3Face == 1) {
|
||
//视频日志
|
||
endWiddget.add(bottomItem(
|
||
'images/main/icon_lockDetail_videoLog.png',
|
||
TranslationLoader.lanKeys!.videoLog!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.videoLogPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}));
|
||
}
|
||
endWiddget.add(
|
||
// 消息提醒
|
||
bottomItem(
|
||
'images/main/icon_lockDetail_messageReminding.png',
|
||
TranslationLoader.lanKeys!.messageReminding!.tr,
|
||
state.openDoorBtnisUneable.value,
|
||
state.bottomBtnisEable.value, () {
|
||
Get.toNamed(Routers.msgNotificationPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
});
|
||
}),
|
||
);
|
||
|
||
endWiddget.add(
|
||
// 设置
|
||
bottomItem('images/main/icon_main_set.png',
|
||
TranslationLoader.lanKeys!.set!.tr, true, true, () {
|
||
// logic.clickItemBtnAction(10);
|
||
Get.toNamed(Routers.lockSetPage, arguments: {
|
||
"lockId": state.keyInfos.value.lockId,
|
||
"isOnlyOneData": state.isOnlyOneData,
|
||
});
|
||
}),
|
||
);
|
||
showWidgetArr.addAll(endWiddget);
|
||
return showWidgetArr;
|
||
}
|
||
|
||
//
|
||
Widget bottomItem(String iconUrl, String name, bool openDoorBtnisUneable,
|
||
bool bottomBtnisEable, Function() onClick) {
|
||
return GestureDetector(
|
||
onTap: openDoorBtnisUneable
|
||
? (bottomBtnisEable
|
||
? onClick
|
||
: () {
|
||
logic.showToast("请在锁旁边完成第一次开锁".tr);
|
||
})
|
||
: null,
|
||
child: Container(
|
||
// height: 300.h,
|
||
color: Colors.white,
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.center,
|
||
children: [
|
||
SizedBox(
|
||
width: 42.w,
|
||
height: 42.h,
|
||
child: FlavorsImg(
|
||
black: true,
|
||
child: Image.asset(iconUrl,
|
||
width: 42.w,
|
||
height: 42.w,
|
||
color: openDoorBtnisUneable
|
||
? (bottomBtnisEable
|
||
? AppColors.mainColor
|
||
: AppColors.lockDetailBottomBtnUneable)
|
||
: AppColors.lockDetailBottomBtnUneable,
|
||
fit: BoxFit.fitWidth),
|
||
),
|
||
),
|
||
SizedBox(height: 10.w),
|
||
Expanded(
|
||
child: Text(name,
|
||
style: TextStyle(
|
||
fontSize: 20.sp,
|
||
color: openDoorBtnisUneable
|
||
? (bottomBtnisEable
|
||
? AppColors.blackColor
|
||
: AppColors.lockDetailBottomBtnUneable)
|
||
: AppColors.lockDetailBottomBtnUneable),
|
||
textAlign: TextAlign.center))
|
||
],
|
||
)),
|
||
);
|
||
}
|
||
|
||
listeningAnimations() async {
|
||
await Future.delayed(Duration.zero, () {
|
||
state.animationController = AnimationController(
|
||
duration: const Duration(seconds: 1), vsync: this);
|
||
state.animationController!.repeat();
|
||
//动画开始、结束、向前移动或向后移动时会调用StatusListener
|
||
state.animationController!.addStatusListener((status) {
|
||
// print("AnimationStatus:$status");
|
||
if (status == AnimationStatus.completed) {
|
||
state.animationController!.reset();
|
||
state.animationController!.forward();
|
||
} else if (status == AnimationStatus.dismissed) {
|
||
state.animationController!.reset();
|
||
state.animationController!.forward();
|
||
}
|
||
});
|
||
});
|
||
}
|
||
|
||
String showElectricIcon(int electricnumber) {
|
||
if (electricnumber >= 100) {
|
||
return 'images/main/icon_lockElectricLevel_5.png';
|
||
} else if ((electricnumber > 50) && (electricnumber < 100)) {
|
||
return 'images/main/icon_lockElectricLevel_4.png';
|
||
} else if ((electricnumber > 25) && (electricnumber <= 50)) {
|
||
return 'images/main/icon_lockElectricLevel_3.png';
|
||
} else if ((electricnumber > 5) && (electricnumber <= 25)) {
|
||
return 'images/main/icon_lockElectricLevel_2.png';
|
||
} else if (electricnumber <= 5) {
|
||
return 'images/main/icon_lockElectricLevel_1.png';
|
||
}
|
||
return 'images/main/icon_lockElectricLevel_5.png';
|
||
}
|
||
|
||
Widget _unlockSuccessWidget() {
|
||
return Stack(
|
||
alignment: Alignment.center,
|
||
children: [
|
||
Image.asset(
|
||
state.iSOpenLock.value == true
|
||
? 'images/main/unlocked_bg.png'
|
||
: 'images/main/locked_bg.png',
|
||
width: 358.w,
|
||
height: 348.h,
|
||
),
|
||
Positioned(
|
||
top: (1.sh - ScreenUtil().statusBarHeight * 2) / 2,
|
||
child: Column(
|
||
children: [
|
||
Text(
|
||
state.keyInfos.value.lockAlias!,
|
||
style: TextStyle(
|
||
color: AppColors.placeholderTextColor, fontSize: 24.sp),
|
||
),
|
||
SizedBox(
|
||
height: 10.h,
|
||
),
|
||
Text(
|
||
getCurrentFormattedTime(),
|
||
style: TextStyle(
|
||
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
|
||
)
|
||
],
|
||
))
|
||
],
|
||
);
|
||
}
|
||
|
||
String getCurrentFormattedTime() {
|
||
// 获取当前时间
|
||
DateTime now = DateTime.now();
|
||
// 格式化日期和时间
|
||
String formattedTime = DateFormat('MM/dd HH:mm').format(now);
|
||
return formattedTime;
|
||
}
|
||
|
||
startOpenLock() {
|
||
if (state.openLockBtnState.value == 1) {
|
||
return;
|
||
}
|
||
state.iSOpenLock.value = true;
|
||
state.iSClosedUnlockSuccessfulPopup.value = false;
|
||
state.openLockBtnState.value = 1;
|
||
// state.animationController!.forward();
|
||
|
||
// if (state.lockUserNo == 0) {
|
||
// // 电子钥匙lockUserNo为0 要先添加用户
|
||
// logic.addUserConnectBlue();
|
||
// } else {
|
||
// print("state.isOpenLockNeedOnline.value:${state.isOpenLockNeedOnline.value}");
|
||
if (state.isOpenLockNeedOnline.value == 0) {
|
||
// 不需要联网
|
||
logic.openDoorAction();
|
||
} else {
|
||
// 需要联网
|
||
logic.getLockNetToken();
|
||
}
|
||
// }
|
||
// });
|
||
}
|
||
|
||
startUnLock() {
|
||
if (state.openLockBtnState.value == 1) {
|
||
return;
|
||
}
|
||
state.iSOpenLock.value = false;
|
||
state.iSClosedUnlockSuccessfulPopup.value = false;
|
||
state.openLockBtnState.value = 1;
|
||
state.animationController!.forward();
|
||
state.openDoorModel = 32;
|
||
|
||
// if (state.lockUserNo == 0) {
|
||
// // 电子钥匙lockUserNo为0 要先添加用户
|
||
// logic.addUserConnectBlue();
|
||
// } else {
|
||
state.openDoorModel = 32;
|
||
logic.openDoorAction();
|
||
// }
|
||
}
|
||
|
||
@override
|
||
void dispose() {
|
||
/// 取消路由订阅
|
||
AppRouteObserver().routeObserver.unsubscribe(this);
|
||
state.closedUnlockSuccessfulTimer?.cancel();
|
||
_lockRefreshLockDetailInfoDataEvent?.cancel();
|
||
state.replySubscription.cancel();
|
||
state.lockSetOpenOrCloseCheckInRefreshLockDetailWithAttendanceEvent!
|
||
.cancel();
|
||
if (state.animationController != null) {
|
||
state.animationController!.dispose();
|
||
state.animationController = null;
|
||
}
|
||
super.dispose();
|
||
}
|
||
|
||
/// 从上级界面进入 当前界面即将出现
|
||
@override
|
||
void didPush() {
|
||
super.didPush();
|
||
state.ifCurrentScreen.value = true;
|
||
}
|
||
|
||
/// 返回上一个界面 当前界面即将消失
|
||
@override
|
||
void didPop() {
|
||
super.didPop();
|
||
state.ifCurrentScreen.value = false;
|
||
logic.cancelBlueConnetctToastTimer();
|
||
BlueManage().disconnect();
|
||
state.openLockBtnState.value = 0;
|
||
}
|
||
|
||
/// 从下级返回 当前界面即将出现
|
||
@override
|
||
void didPopNext() {
|
||
super.didPopNext();
|
||
state.ifCurrentScreen.value = true;
|
||
}
|
||
|
||
/// 进入下级界面 当前界面即将消失
|
||
@override
|
||
void didPushNext() {
|
||
super.didPushNext();
|
||
state.ifCurrentScreen.value = false;
|
||
logic.cancelBlueConnetctToastTimer();
|
||
state.openLockBtnState.value = 0;
|
||
}
|
||
}
|