Merge branch 'master' of gitee.com:starlock-cn/app-starlock

This commit is contained in:
Daisy 2024-05-13 17:43:57 +08:00
commit 6bc644c5e9

View File

@ -145,23 +145,35 @@ class _LockDetailPageState extends State<LockDetailPage>
return Scaffold(
backgroundColor: Colors.white,
body: Obx(() {
return Column(
return Stack(
children: [
SizedBox(
height: 35.h,
Column(
children: [
SizedBox(
height: 35.h,
),
xhjInfoView(),
SizedBox(
height: 35.h,
),
labelText('images/icon_slider_horizontal.png', '功能'.tr, () {
Get.to(LockDetailListPage(
title: '功能'.tr, items: getBottomWidget()));
}),
labelText('images/icon_puzzlepiece_extension.png', '配件'.tr, () {
Get.to(LockDetailListPage(
title: '配件'.tr, items: getAttachmentWidget()));
}),
],
),
xhjInfoView(),
SizedBox(
height: 35.h,
),
labelText('images/icon_slider_horizontal.png', '功能'.tr, () {
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()),
)
],
);
}),
@ -447,19 +459,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()),
),
child: Container(
width: 1.sw,
height: 1.sh - ScreenUtil().statusBarHeight * 2,
color: Colors.black.withOpacity(0.3),
child: _unlockSuccessWidget()),
)
]),
],
@ -1242,36 +1246,54 @@ class _LockDetailPageState extends State<LockDetailPage>
}
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),
)
],
))
],
return Center(
child: Stack(
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: 180.h,
left: 55.w,
child: Column(
mainAxisSize: MainAxisSize.min,
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),
)
],
)),
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,
)),
),
],
),
);
}