From 08b71afe962c9c060749bdbec5b10337d68da501 Mon Sep 17 00:00:00 2001 From: Daisy <> Date: Thu, 4 Jan 2024 15:52:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E9=94=81=E6=88=90=E5=8A=9F=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lockDetail/lockDetail_page.dart | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart index 8cbf5404..b6a6629d 100644 --- a/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart +++ b/star_lock/lib/main/lockDetail/lockDetail/lockDetail_page.dart @@ -506,43 +506,45 @@ class _LockDetailPageState extends State 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();