From 11c90ca414011335b492bc7bd522adb4bb75a96a Mon Sep 17 00:00:00 2001 From: anfe <448468458@qq.com> Date: Mon, 20 May 2024 15:09:09 +0800 Subject: [PATCH] =?UTF-8?q?faet:=E4=BB=A3=E7=A0=81=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../checkingInList/checkingInList_page.dart | 78 +++++++++---------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart index 608da425..17e73087 100755 --- a/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart +++ b/lib/main/lockDetail/checkingIn/checkingInList/checkingInList_page.dart @@ -38,27 +38,28 @@ class _CheckingInListPageState extends State { haveBack: true, backgroundColor: AppColors.mainColor, actionsList: [ - (state.getKeyInfosData.value.keyRight == 1) - ? GestureDetector( - onTap: () async { - final bool? isDemoMode = - await Storage.getBool(ifIsDemoModeOrNot); - if (isDemoMode == false) { - Get.toNamed(Routers.checkingInSetPage, - arguments: { - 'getKeyInfosData': state.getKeyInfosData.value, - }); - } else { - // Get.toNamed(Routers.selectLockTypePage); - logic.showToast('演示模式'); - } - }, - child: Image.asset( - 'images/main/icon_lockDetail_checkIn_set.png', - width: 36.w, - height: 36.w, - )) - : Container(), + if (state.getKeyInfosData.value.keyRight == 1) + GestureDetector( + onTap: () async { + final bool? isDemoMode = + await Storage.getBool(ifIsDemoModeOrNot); + if (isDemoMode == false) { + Get.toNamed(Routers.checkingInSetPage, + arguments: { + 'getKeyInfosData': state.getKeyInfosData.value, + }); + } else { + // Get.toNamed(Routers.selectLockTypePage); + logic.showToast('演示模式'); + } + }, + child: Image.asset( + 'images/main/icon_lockDetail_checkIn_set.png', + width: 36.w, + height: 36.w, + )) + else + Container(), SizedBox(width: 30.w), ], ), @@ -399,26 +400,21 @@ class _CheckingInListPageState extends State { SizedBox( width: 20.w, ), - Image.asset( - getTypeIcon(type ?? 0), - width: 60.w, - height: 60.w, - ), - // Container( - // width: 60.h, - // height: 60.h, - // decoration: BoxDecoration( - // color: AppColors.mainColor, - // border: Border.all(width: 1, color: AppColors.mainColor), - // borderRadius: BorderRadius.circular(30.h), - // ), - // padding: EdgeInsets.all(10.w), - // child: Image.asset( - // 'images/controls_user.png', - // width: 30.w, - // height: 30.w, - // color: Colors.white, - // )), + if (headUrl == null || headUrl == '') + Image.asset( + getTypeIcon(type ?? 0), + width: 60.w, + height: 60.w, + ) + else + ClipRRect( + borderRadius: BorderRadius.circular(100.w), + child: Image.network( + headUrl, + width: 60.w, + height: 60.w, + ), + ), SizedBox(width: 20.w), Expanded( child: Text(