更新样式

This commit is contained in:
wyf
2025-07-09 15:28:46 +08:00
parent c37ae7f293
commit ceb228b256
4 changed files with 98 additions and 41 deletions

View File

@@ -55,10 +55,11 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
backgroundColor: Colors.white,
highlightColor: Colors.white,
borderRadius: 20.rpx,
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 36.rpx, 55.rpx, 52.rpx),
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 36.rpx, 55.rpx, 36.rpx),
onTap: () async {},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Row(
@@ -246,14 +247,14 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
.getDeviceList(group: 'room')
.then((apiResponse) {
if (apiResponse.code != HttpStatusCodes.ok) {
try {
WebviewTestController webviewTestController =
Get.find();
webviewTestController.web.jsbridge?.dart
.alterDevice();
} catch (e) {
ef.log("[h5]通知列表更新报错:$e");
}
try {
WebviewTestController webviewTestController =
Get.find();
webviewTestController.web.jsbridge?.dart
.alterDevice();
} catch (e) {
ef.log("[h5]通知列表更新报错:$e");
}
TopSlideNotification.show(
Get.context!,
text: apiResponse.msg!,
@@ -638,7 +639,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
await read!.characteristic.setNotifyValue(true);
final write =
bledevice.getresource('ffe0/ffe1'); // 与 read 同 characteristic
bledevice.getresource('ffe0/ffe1'); // 与 read 同 characteristic
const int maxRetries = 2;
for (int attempt = 0; attempt < maxRetries; attempt++) {
final completer = Completer<String>();

View File

@@ -209,10 +209,10 @@ class DeviceInfoWidget extends GetView {
WebviewTestController webviewTestController =
Get.find();
await webviewTestController.web.jsbridge?.dart
webviewTestController.web.jsbridge?.dart
.pageActive(false);
await Future.delayed(Duration(seconds: 1));
await webviewTestController.web.jsbridge?.dart
webviewTestController.web.jsbridge?.dart
.appToHtmlDevice(device);
MainPageBBottomChange.jumpTo(2);
Get.until((route) =>