开锁成功弹出框

This commit is contained in:
Daisy 2024-01-04 15:52:47 +08:00
parent 22bd7e01b3
commit 08b71afe96

View File

@ -506,43 +506,45 @@ class _LockDetailPageState extends State<LockDetailPage> with TickerProviderStat
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
color: Colors.black.withOpacity(0.5),
child: Stack(
alignment: Alignment.center,
children: [
Image.asset(
'images/main/unlocked_bg.png',
width: 358.w,
height: 348.h,
),
Positioned(
top: ScreenUtil().screenHeight / 2 - 10.h,
child: Column(
children: [
Text(
widget.lockListInfoItemEntity.lockAlias!,
style: TextStyle(
color: AppColors.placeholderTextColor,
fontSize: 26.sp),
),
SizedBox(
height: 10.h,
),
Text(
getCurrentFormattedTime(),
style: TextStyle(
color: AppColors.darkGrayTextColor,
fontSize: 26.sp),
)
],
))
],
),
child: unlockSuccessWidget(),
),
);
},
);
}
Widget unlockSuccessWidget() {
return Stack(
alignment: Alignment.center,
children: [
Image.asset(
'images/main/unlocked_bg.png',
width: 358.w,
height: 348.h,
),
Positioned(
top: ScreenUtil().screenHeight / 2 - 10.h,
child: Column(
children: [
Text(
widget.lockListInfoItemEntity.lockAlias!,
style: TextStyle(
color: AppColors.placeholderTextColor, fontSize: 26.sp),
),
SizedBox(
height: 10.h,
),
Text(
getCurrentFormattedTime(),
style: TextStyle(
color: AppColors.darkGrayTextColor, fontSize: 26.sp),
)
],
))
],
);
}
String getCurrentFormattedTime() {
//
DateTime now = DateTime.now();