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