1,锁详情页面新增手机需联网字段及标识
2,xhj锁详情页面部分调整
This commit is contained in:
parent
5127456bad
commit
ba0b9c0fab
BIN
images/main/icon_lockDetail_needNetwork.png
Normal file
BIN
images/main/icon_lockDetail_needNetwork.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@ -253,6 +253,72 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
Positioned(
|
||||||
|
child: 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>[
|
||||||
|
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(
|
||||||
|
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),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state.openDoorBtnisUneable.value == true) {
|
if (state.openDoorBtnisUneable.value == true) {
|
||||||
@ -282,7 +348,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
spreadRadius: 0,
|
spreadRadius: 0,
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
margin: EdgeInsets.only(top: 20.h),
|
margin: EdgeInsets.only(top: 0.h),
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: AlignmentDirectional.center,
|
alignment: AlignmentDirectional.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@ -326,10 +392,10 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
TranslationLoader
|
TranslationLoader
|
||||||
@ -339,76 +405,12 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
fontSize: 20.sp,
|
fontSize: 20.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 16.h,
|
||||||
|
),
|
||||||
adminInfoView(center: false, max: false),
|
adminInfoView(center: false, max: false),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
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>[
|
|
||||||
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(
|
|
||||||
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),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -760,6 +762,24 @@ class _LockDetailPageState extends State<LockDetailPage>
|
|||||||
? AppColors.mainColor
|
? AppColors.mainColor
|
||||||
: AppColors.btnDisableColor),
|
: AppColors.btnDisableColor),
|
||||||
),
|
),
|
||||||
|
if (add) SizedBox(width: 20.w) else SizedBox(width: 40.w),
|
||||||
|
FlavorsImg(
|
||||||
|
child: Image.asset('images/main/icon_lockDetail_needNetwork.png',
|
||||||
|
width: 24.w,
|
||||||
|
height: 20.w,
|
||||||
|
color: state.keyInfos.value.appUnlockOnline == 1
|
||||||
|
? AppColors.mainColor
|
||||||
|
: AppColors.btnDisableColor),
|
||||||
|
),
|
||||||
|
SizedBox(width: 6.w),
|
||||||
|
Text(
|
||||||
|
'手机需联网',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp,
|
||||||
|
color: state.keyInfos.value.appUnlockOnline == 1
|
||||||
|
? AppColors.mainColor
|
||||||
|
: AppColors.btnDisableColor),
|
||||||
|
),
|
||||||
if (add) ...<Widget>[
|
if (add) ...<Widget>[
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
|
|||||||
@ -133,6 +133,7 @@ class LockListInfoItemEntity {
|
|||||||
LockFeature? lockFeature;
|
LockFeature? lockFeature;
|
||||||
LockSetting? lockSetting;
|
LockSetting? lockSetting;
|
||||||
int? hasGateway;
|
int? hasGateway;
|
||||||
|
int? appUnlockOnline;
|
||||||
String? mac;
|
String? mac;
|
||||||
|
|
||||||
LockListInfoItemEntity({
|
LockListInfoItemEntity({
|
||||||
@ -169,6 +170,7 @@ class LockListInfoItemEntity {
|
|||||||
this.model,
|
this.model,
|
||||||
this.vendor,
|
this.vendor,
|
||||||
this.hasGateway,
|
this.hasGateway,
|
||||||
|
this.appUnlockOnline,
|
||||||
this.mac,
|
this.mac,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -212,6 +214,7 @@ class LockListInfoItemEntity {
|
|||||||
? LockSetting.fromJson(json['lockSetting'])
|
? LockSetting.fromJson(json['lockSetting'])
|
||||||
: null;
|
: null;
|
||||||
hasGateway = json['hasGateway'];
|
hasGateway = json['hasGateway'];
|
||||||
|
appUnlockOnline = json['appUnlockOnline'];
|
||||||
mac = json['mac'];
|
mac = json['mac'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,6 +259,7 @@ class LockListInfoItemEntity {
|
|||||||
data['lockSetting'] = lockSetting!.toJson();
|
data['lockSetting'] = lockSetting!.toJson();
|
||||||
}
|
}
|
||||||
data['hasGateway'] = hasGateway;
|
data['hasGateway'] = hasGateway;
|
||||||
|
data['appUnlockOnline'] = appUnlockOnline;
|
||||||
data['mac'] = mac;
|
data['mac'] = mac;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user