fix:修复 开锁页-右上角-电池电量图标一个电池的显示2块电池图标。另点!无反应,应有电量更新显示

This commit is contained in:
anfe 2024-05-28 17:45:59 +08:00
parent fea93bdf1e
commit 962cd839f2

View File

@ -342,66 +342,72 @@ class _LockDetailPageState extends State<LockDetailPage>
adminInfoView(center: false, max: false),
],
),
Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Image.asset(
showElectricIcon(state.electricQuantity.value),
width: 30.w,
height: 24.w),
SizedBox(width: 2.w),
Text('${state.electricQuantity.value}%',
style: TextStyle(
fontSize: 18.sp,
color: AppColors.darkGrayTextColor)),
SizedBox(width: 2.w),
Icon(
Icons.info, // 使 warning
color: AppColors.mainColor, //
size: 25.w, // 30
),
SizedBox(width: 20.w),
],
),
SizedBox(
height: 15.h,
),
Visibility(
visible: state
.keyInfos.value.lockFeature!.isSupportBackupBattery ==
1,
child: Row(
GestureDetector(
onTap: () {
ShowTipView().showSureAlertDialog(
"${"锁电量更新时间:".tr}${DateTool().dateToYMDHNString(state.keyInfos.value.electricQuantityDate!.toString())}");
},
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlavorsImg(
child: Image.asset(
showElectricIcon(
state.electricQuantityStandby.value),
width: 30.w,
height: 24.w),
),
Image.asset(
showElectricIcon(state.electricQuantity.value),
width: 30.w,
height: 24.w),
SizedBox(width: 2.w),
Text('${state.electricQuantityStandby.value}%',
Text('${state.electricQuantity.value}%',
style: TextStyle(
fontSize: 18.sp,
color: AppColors.darkGrayTextColor)),
SizedBox(width: 2.w),
FlavorsImg(
child: Icon(
Icons.info, // 使 warning
color: AppColors.mainColor, //
size: 25.w, // 30
),
Icon(
Icons.info, // 使 warning
color: AppColors.mainColor, //
size: 25.w, // 30
),
SizedBox(width: 20.w),
],
),
)
],
SizedBox(
height: 15.h,
),
Visibility(
visible: state.keyInfos.value.lockFeature!
.isSupportBackupBattery ==
1,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlavorsImg(
child: Image.asset(
showElectricIcon(
state.electricQuantityStandby.value),
width: 30.w,
height: 24.w),
),
SizedBox(width: 2.w),
Text('${state.electricQuantityStandby.value}%',
style: TextStyle(
fontSize: 18.sp,
color: AppColors.darkGrayTextColor)),
SizedBox(width: 2.w),
FlavorsImg(
child: Icon(
Icons.info, // 使 warning
color: AppColors.mainColor, //
size: 25.w, // 30
),
),
SizedBox(width: 20.w),
],
),
)
],
),
)
],
),