feat:修复开锁键提示

This commit is contained in:
anfe 2024-05-13 17:34:29 +08:00
parent 4b6ae01e9a
commit 21c315b347

View File

@ -147,7 +147,9 @@ class _LockDetailPageState extends State<LockDetailPage>
return Scaffold(
backgroundColor: Colors.white,
body: Obx(() {
return Column(
return Stack(
children: [
Column(
children: [
SizedBox(
height: 35.h,
@ -157,14 +159,24 @@ class _LockDetailPageState extends State<LockDetailPage>
height: 35.h,
),
labelText('images/icon_slider_horizontal.png', '功能'.tr, () {
Get.to(
LockDetailListPage(title: '功能'.tr, items: getBottomWidget()));
Get.to(LockDetailListPage(
title: '功能'.tr, items: getBottomWidget()));
}),
labelText('images/icon_puzzlepiece_extension.png', '配件'.tr, () {
Get.to(LockDetailListPage(
title: '配件'.tr, items: getAttachmentWidget()));
}),
],
),
Visibility(
visible: state.iSClosedUnlockSuccessfulPopup.value,
child: Container(
width: 1.sw,
height: 1.sh - ScreenUtil().statusBarHeight * 2,
color: Colors.black.withOpacity(0.3),
child: _unlockSuccessWidget()),
)
],
);
}),
);
@ -449,19 +461,11 @@ class _LockDetailPageState extends State<LockDetailPage>
),
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()),
),
)
]),
],
@ -1222,8 +1226,8 @@ class _LockDetailPageState extends State<LockDetailPage>
}
Widget _unlockSuccessWidget() {
return Stack(
alignment: Alignment.center,
return Center(
child: Stack(
children: [
Image.asset(
state.iSOpenLock.value == true
@ -1233,8 +1237,10 @@ class _LockDetailPageState extends State<LockDetailPage>
height: 348.h,
),
Positioned(
top: (1.sh - ScreenUtil().statusBarHeight * 2) / 2,
top: 180.h,
left: 55.w,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
state.keyInfos.value.lockAlias!,
@ -1250,8 +1256,24 @@ class _LockDetailPageState extends State<LockDetailPage>
color: AppColors.darkGrayTextColor, fontSize: 24.sp),
)
],
))
)),
Positioned(
top: 288.h,
left: 155.w,
child: GestureDetector(
onTap: () {
setState(() {
state.iSClosedUnlockSuccessfulPopup.value = false;
});
},
child: Container(
width: 60.r,
height: 60.r,
color: Colors.transparent,
)),
),
],
),
);
}