fix:修复 xhj 开锁按钮显示异常的问题
This commit is contained in:
parent
903b19700e
commit
7c58c482e4
@ -250,7 +250,7 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
@ -269,8 +269,8 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: 100.r,
|
||||
height: 100.r,
|
||||
width: 200.r,
|
||||
height: 200.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(100.w),
|
||||
@ -282,51 +282,47 @@ class _LockDetailPageState extends State<LockDetailPage>
|
||||
spreadRadius: 0,
|
||||
),
|
||||
]),
|
||||
margin: EdgeInsets.only(left: 35.w, bottom: 15.h),
|
||||
margin: EdgeInsets.only(top: 20.h),
|
||||
child: Stack(
|
||||
alignment: AlignmentDirectional.center,
|
||||
children: <Widget>[
|
||||
if (state.openDoorBtnisUneable.value == false)
|
||||
Icon(
|
||||
Icons.bluetooth_searching,
|
||||
size: 48.r,
|
||||
color: AppColors.mainColor,
|
||||
size: 78.r,
|
||||
color: AppColors.mainColor.withOpacity(0.6),
|
||||
)
|
||||
else
|
||||
Image.asset(
|
||||
state.isOpenPassageMode.value == 1
|
||||
? 'images/icon_lock_err.png'
|
||||
: 'images/icon_lock_fill.png',
|
||||
width: 38.r,
|
||||
height: 38.r,
|
||||
width: 68.r,
|
||||
height: 68.r,
|
||||
color: AppColors.mainColor,
|
||||
),
|
||||
if (state.openDoorBtnisUneable.value == false)
|
||||
Positioned(
|
||||
child: Icon(
|
||||
Icons.bluetooth_searching,
|
||||
size: 96.r,
|
||||
),
|
||||
if (state.openLockBtnState.value == 1)
|
||||
xhjBuildRotationTransition(
|
||||
width: 168.r,
|
||||
height: 168.r,
|
||||
)
|
||||
else
|
||||
state.openLockBtnState.value == 1
|
||||
? xhjBuildRotationTransition(
|
||||
width: 88.r,
|
||||
height: 88.r,
|
||||
)
|
||||
: Positioned(
|
||||
child: Image.asset(
|
||||
'images/icon_circle_dotted.png',
|
||||
width: 88.r,
|
||||
height: 88.r,
|
||||
color: state.isOpenPassageMode.value == 1
|
||||
? Colors.red
|
||||
: AppColors.mainColor,
|
||||
)),
|
||||
Positioned(
|
||||
child: Image.asset(
|
||||
'images/icon_circle_dotted.png',
|
||||
width: 168.r,
|
||||
height: 168.r,
|
||||
color: state.openDoorBtnisUneable.value == false
|
||||
? AppColors.mainColor.withOpacity(0.6)
|
||||
: state.isOpenPassageMode.value == 1
|
||||
? Colors.red
|
||||
: AppColors.mainColor,
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 15.w, right: 00.w, bottom: 15.h),
|
||||
child: Row(
|
||||
|
||||
@ -62,14 +62,16 @@ class UDPManage {
|
||||
// AppLog.log('Udp ----> host:$host port:$port');
|
||||
var addressIListenFrom = InternetAddress.anyIPv4;
|
||||
int portIListenOn = 62288;
|
||||
RawDatagramSocket.bind(addressIListenFrom, portIListenOn)
|
||||
.then((RawDatagramSocket socket) {
|
||||
_udpSocket = socket;
|
||||
if(addressIListenFrom.address != '0.0.0.0'){
|
||||
RawDatagramSocket.bind(addressIListenFrom, portIListenOn)
|
||||
.then((RawDatagramSocket socket) {
|
||||
_udpSocket = socket;
|
||||
|
||||
///广播功能
|
||||
_udpSocket!.broadcastEnabled = true;
|
||||
_onReceiveData(socket);
|
||||
});
|
||||
///广播功能
|
||||
_udpSocket!.broadcastEnabled = true;
|
||||
_onReceiveData(socket);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void _onReceiveData(RawDatagramSocket socket) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user