diff --git a/android/local.properties b/android/local.properties index 8561db0..d264f4c 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,6 +1,6 @@ sdk.dir=C:\\Users\\wyf\\AppData\\Local\\Android\\sdk flutter.sdk=D:\\flutter_res\\flutter -flutter.buildMode=release +flutter.buildMode=debug flutter.versionName=1.0.0 flutter.versionCode=1 flutter.minSdkVersion=22 diff --git a/assets/file.json b/assets/file.json index c481358..e20e2ff 100644 --- a/assets/file.json +++ b/assets/file.json @@ -1,3 +1,3 @@ [ - "assets/miniapp/mhtControl_1.0.83.zip" + "assets/miniapp/mhtControl_1.0.84.zip" ] \ No newline at end of file diff --git a/assets/langs/en_US.json b/assets/langs/en_US.json index 38110f4..cd0fc51 100644 --- a/assets/langs/en_US.json +++ b/assets/langs/en_US.json @@ -247,7 +247,7 @@ "请输入体重": "Please enter weight", "必须登录提示": "Please login first!", "待开发功能": "New feature coming soon", - "未知数据": "Unknown", + "未知数据": "-", "在离床": "In/Out", "体动": "Motion", "心率": "Heart rate", diff --git a/assets/miniapp/mhtControl_1.0.83.zip b/assets/miniapp/mhtControl_1.0.84.zip similarity index 97% rename from assets/miniapp/mhtControl_1.0.83.zip rename to assets/miniapp/mhtControl_1.0.84.zip index e1257e1..a1fb208 100644 Binary files a/assets/miniapp/mhtControl_1.0.83.zip and b/assets/miniapp/mhtControl_1.0.84.zip differ diff --git a/lib/pages/mh_page/Vital_signs_sensor.dart b/lib/pages/mh_page/Vital_signs_sensor.dart index cf1816e..bd1a371 100644 --- a/lib/pages/mh_page/Vital_signs_sensor.dart +++ b/lib/pages/mh_page/Vital_signs_sensor.dart @@ -438,528 +438,6 @@ class _VitalSignsSensorState extends State { } } -// class VitalWidget extends StatelessWidget { -// final String title; -// final Map data; - -// const VitalWidget({ -// super.key, -// required this.title, -// required this.data, -// }); - -// @override -// Widget build(BuildContext context) { -// MHTBlueToothController mhtBlueToothController = Get.find(); -// final String id = data['mac'.tr] ?? '--'; -// final int? timestamp = data['status']['updateTime']; -// final String time = (timestamp != null) -// ? DateFormat('yyyy-MM-dd HH:mm') -// .format(DateTime.fromMillisecondsSinceEpoch(timestamp)) -// : '--'; -// return ClickableContainer( -// backgroundColor: Color(0xFF003058), -// highlightColor: Color(0xFF055466), -// borderRadius: 20.rpx, -// padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 30.rpx, 30.rpx, 40.rpx), -// onTap: () {}, -// child: Column( -// mainAxisSize: MainAxisSize.max, -// children: [ -// Container( -// width: double.infinity, -// // constraints: BoxConstraints( -// // minHeight: 60.rpx, -// // ), -// child: Align( -// alignment: AlignmentDirectional(-1, 0), -// child: Text( -// // '实时监测结果通知'.tr, -// title, -// style: TextStyle( -// fontFamily: 'Inter', -// fontSize: 30.rpx, -// letterSpacing: 0.0, -// color: themeController.currentColor.sc3, -// ), -// ), -// ), -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.start, -// children: [ -// Container( -// width: MediaQuery.sizeOf(context).width * 0.14, -// constraints: BoxConstraints(minWidth: 110.rpx), -// child: Text( -// "设备ID".tr, -// style: TextStyle( -// color: stringToColor("#929699"), -// fontSize: 26.rpx, -// ), -// maxLines: 2, -// overflow: TextOverflow.ellipsis, -// ), -// ), -// Text( -// id, -// style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), -// ), -// ].divide(SizedBox(width: 33.rpx)), -// ), -// Row( -// mainAxisAlignment: MainAxisAlignment.start, -// children: [ -// Container( -// width: MediaQuery.sizeOf(context).width * 0.14, -// constraints: BoxConstraints(minWidth: 110.rpx), -// child: Text( -// "更新时间".tr, -// style: TextStyle( -// color: stringToColor("#929699"), -// fontSize: 26.rpx, -// ), -// maxLines: 2, -// overflow: TextOverflow.ellipsis, -// ), -// ), -// Text( -// time, -// style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), -// ), -// ].divide(SizedBox(width: 33.rpx)), -// ), -// Row( -// mainAxisSize: MainAxisSize.max, -// children: [ -// Container( -// width: MediaQuery.sizeOf(context).width * 0.14, -// constraints: BoxConstraints(minWidth: 110.rpx), -// child: Text( -// "设备状态".tr, -// style: TextStyle( -// color: stringToColor("#929699"), -// fontSize: 26.rpx, -// ), -// maxLines: 2, -// overflow: TextOverflow.ellipsis, -// ), -// ), -// Row( -// mainAxisSize: MainAxisSize.max, -// children: [ -// if (data['status']['signal'] != null && -// data['status']['signal'] != -1 && -// data['status']['status'] != null && -// data['status']['status'] == 1) -// ClickableContainer( -// backgroundColor: Colors.transparent, -// highlightColor: Colors.grey, // 或根据你主题定制颜色 -// padding: EdgeInsets.zero, -// borderRadius: 0, -// onTap: () { -// // 点击事件 -// showTipDialog( -// context, -// Container( -// child: RichText( -// text: TextSpan( -// text: "信号强度".tr, // 文本前缀部分 -// style: TextStyle( -// color: Colors.black, -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// children: [ -// TextSpan( -// text: getBedSignal( -// data['status']['signal']), // 状态部分 -// style: TextStyle( -// color: themeController -// .currentColor.sc2, // 同样颜色,也可改成其他颜色 -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// ], -// ), -// ), -// ), -// backgroundColor: Color(0xFFFFFFFF), -// colors: [ -// Color(0XFF1592AA), -// Color(0xFF0C83A7), -// Color(0xFF006FA3) -// ], -// ); -// }, - -// child: Container( -// width: 30.rpx, -// height: 24.rpx, -// child: Image.asset( -// 'assets/img/signal${_getSignalLevel(data['status']['signal'])}.png'), -// ), -// ), -// if (data['status']['inBed'] != null && -// data['status']['status'] != null && -// data['status']['status'] == 1) -// ClickableContainer( -// backgroundColor: Colors.transparent, -// highlightColor: Colors.grey, -// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), -// borderRadius: 0, -// onTap: () { -// showTipDialog( -// context, -// Container( -// child: RichText( -// text: TextSpan( -// text: "是否在床".tr, // 文本前缀部分 -// style: TextStyle( -// color: Colors.black, -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// children: [ -// TextSpan( -// text: getBedStatus( -// data['status']['inBed']), // 状态部分 -// style: TextStyle( -// color: themeController -// .currentColor.sc2, // 同样颜色,也可改成其他颜色 -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// ], -// ), -// ), -// ), -// backgroundColor: Color(0xFFFFFFFF), -// colors: [ -// Color(0XFF1592AA), -// Color(0xFF0C83A7), -// Color(0xFF006FA3) -// ], -// ); -// }, -// child: SizedBox( -// width: 16.rpx, -// height: 36.rpx, -// child: SvgPicture.asset( -// data['status']['inBed'] == 0 -// ? 'assets/img/icon/not_bed.svg' -// : 'assets/img/icon/in_bed.svg', -// fit: BoxFit.fill, -// ), -// ), -// ), -// if (data['status']['failure'] != 0 && -// data['status']['status'] != null && -// data['status']['status'] == 1) -// ClickableContainer( -// backgroundColor: Colors.transparent, -// highlightColor: Colors.grey, // 可自定义点击水波纹颜色 -// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), -// borderRadius: 0, -// onTap: () { -// showTipDialog( -// context, -// Container( -// child: RichText( -// text: TextSpan( -// text: "设备故障".tr, // 文本前缀部分 -// style: TextStyle( -// color: Colors.black, -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// children: [ -// // TextSpan( -// // text:widget -// // .device['status']['status'] == 1?"在线".tr:"离线".tr, // 状态部分 -// // style: TextStyle( -// // color: themeController.currentColor -// // .sc2, // 同样颜色,也可改成其他颜色 -// // fontSize: AppConstants() -// // .title_text_fontSize, -// // ), -// // ), -// ], -// ), -// ), -// ), -// backgroundColor: Color(0xFFFFFFFF), -// colors: [ -// Color(0XFF1592AA), -// Color(0xFF0C83A7), -// Color(0xFF006FA3) -// ], -// ); -// }, -// child: SizedBox( -// width: 27.rpx, -// height: 27.rpx, -// child: SvgPicture.asset( -// 'assets/img/icon/device_issue.svg', -// fit: BoxFit.cover, -// ), -// ), -// ), -// if (data['status']['status'] != null && -// data['status']['status'] == 0) -// ClickableContainer( -// backgroundColor: Colors.transparent, -// highlightColor: Colors.grey, // 可替换为点击高亮色 -// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), -// borderRadius: 0, -// onTap: () { -// showTipDialog( -// context, -// Container( -// child: RichText( -// text: TextSpan( -// text: "网络状态".tr, // 文本前缀部分 -// style: TextStyle( -// color: Colors.black, -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// children: [ -// TextSpan( -// text: data['status']['status'] == 1 -// ? "在线".tr -// : "离线".tr, // 状态部分 -// style: TextStyle( -// color: themeController -// .currentColor.sc2, // 同样颜色,也可改成其他颜色 -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// ], -// ), -// ), -// ), -// backgroundColor: Color(0xFFFFFFFF), -// colors: [ -// Color(0XFF1592AA), -// Color(0xFF0C83A7), -// Color(0xFF006FA3) -// ], -// ); -// }, -// child: SizedBox( -// width: 27.rpx, -// height: 27.rpx, -// child: SvgPicture.asset( -// // data['status']['status'] == 1 -// // ? 'assets/img/icon/device_online.svg' -// // : 'assets/img/icon/device_offline.svg', -// 'assets/img/icon/device_issue.svg', -// fit: BoxFit.cover, -// ), -// ), -// ), -// if (mhtBlueToothController.localUpgradeMac -// .containsKey(data['mac'])) -// ClickableContainer( -// backgroundColor: Colors.transparent, -// highlightColor: Colors.grey, // 可自定义点击效果颜色 -// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), -// borderRadius: 0, -// onTap: () { -// String curCersion = mhtBlueToothController -// .localUpgradeMac[data['mac']]!['curversion'] -// .toString(); -// String newVersion = -// mhtBlueToothController.currentUpgradeVersion ?? -// ""; -// if (mhtBlueToothController -// .localUpgradeMac[data['mac']]!['progress'] == -// -1) { -// showConfirmUpDialog( -// context, -// Column( -// children: [ -// SizedBox( -// width: 94.rpx, -// height: 70.rpx, -// child: SvgPicture.asset( -// 'assets/img/icon/upgrade.svg', -// fit: BoxFit.cover, -// ), -// ), -// Text( -// "设备升级".tr, -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// Text( -// "当前版本".tr + ":" + "${curCersion}", -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// Text( -// "最新版本".tr + ":" + "${newVersion}", -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// ].divide(SizedBox(height: 37.rpx)), -// ), -// "".tr, onConfirm: () async { -// final deviceData = mhtBlueToothController -// .localUpgradeMac[data['mac']]!; -// final firmwareUrl = -// mhtBlueToothController.currentUpgradeUrl; - -// if (firmwareUrl == null) { -// TopSlideNotification.show(context, -// text: "未获取到固件下载地址".tr); -// return; -// } - -// try { -// final scanResult = -// deviceData['device'].scanResult; -// final thapp = THapp(device: scanResult.device); - -// if (!thapp.isConnected) { -// await thapp.device.connect(); -// } - -// await MultiDeviceFirmwareUpdater().startUpgrade( -// thapp: thapp, -// mac: data['mac'], -// firmwareUrl: firmwareUrl, -// ); -// } catch (e) { -// print("升级失败: $e"); -// TopSlideNotification.show(context, -// text: "升级失败: ${e.toString()}".tr, -// textColor: Colors.red); -// } -// }, -// onCancel: () {}, -// backgroundColor: Colors.white, -// confirmText: "立即升级".tr, -// cancelText: "下次再说".tr); -// // return; -// } else { -// showConfirmCancelDialog( -// context, -// Column( -// children: [ -// SizedBox( -// width: 94.rpx, -// height: 70.rpx, -// child: SvgPicture.asset( -// 'assets/img/icon/upgrade.svg', -// fit: BoxFit.cover, -// // color: themeController.currentColor.sc3, // 若你想加颜色控制可取消注释 -// ), -// ), -// Text( -// "设备升级".tr, -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// Text( -// "当前版本".tr + -// ":" + -// "${mhtBlueToothController.localUpgradeMac[data['mac']]!['curversion']}", -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// Text( -// "最新版本".tr + ":" + "${newVersion}", -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// Text( -// "升级进度".tr + -// ":" + -// "${mhtBlueToothController.localUpgradeMac[data['mac']]!['progress']}" + -// "%", -// style: TextStyle( -// color: stringToColor("#333333"), -// fontSize: -// AppConstants().title_text_fontSize, -// ), -// ), -// ].divide(SizedBox(height: 37.rpx)), -// ), -// "".tr, onConfirm: () async { -// //todo 取消升级 将进度改为-1 -// }, -// onCancel: () {}, -// backgroundColor: Colors.white, -// confirmText: "取消升级".tr, -// cancelText: "返回".tr, -// confirmButtonColor: stringToColor("#FF7159")); -// } -// }, -// child: Obx(() { -// var aa = mhtBlueToothController.isScanning; -// print(aa); -// return Row( -// children: [ -// SizedBox( -// width: 34.rpx, -// height: 24.rpx, -// child: SvgPicture.asset( -// 'assets/img/icon/upgrade.svg', -// fit: BoxFit.cover, -// // color: themeController.currentColor.sc3, // 若你想加颜色控制可取消注释 -// ), -// ), -// if ((mhtBlueToothController.localUpgradeMac[ -// data['mac']]!['progress']) != -// -1) -// Text( -// "${mhtBlueToothController.localUpgradeMac[data['mac']]!['progress']}" + -// "%", -// style: TextStyle( -// color: Colors.white, -// fontSize: 26.rpx, -// ), -// ), -// ].divide(SizedBox( -// width: 10.rpx, -// )), -// ); -// }), -// ), -// ].divide(SizedBox(width: 50.rpx)), -// ), -// ].divide(SizedBox(width: 34.rpx)), -// ), -// ].divide( -// SizedBox(height: 20.rpx), -// )), -// ); -// } -// } - class VitalWidget extends StatelessWidget { final String title; final Map data; @@ -979,7 +457,6 @@ class VitalWidget extends StatelessWidget { ? DateFormat('yyyy-MM-dd HH:mm') .format(DateTime.fromMillisecondsSinceEpoch(timestamp)) : '--'; - return ClickableContainer( backgroundColor: Color(0xFF003058), highlightColor: Color(0xFF055466), @@ -987,85 +464,88 @@ class VitalWidget extends StatelessWidget { padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 30.rpx, 30.rpx, 40.rpx), onTap: () {}, child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - width: double.infinity, - child: Align( - alignment: AlignmentDirectional(-1, 0), - child: Text( - title, - style: TextStyle( - fontFamily: 'Inter', - fontSize: 30.rpx, - letterSpacing: 0.0, - color: themeController.currentColor.sc3, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + // constraints: BoxConstraints( + // minHeight: 60.rpx, + // ), + child: Align( + alignment: AlignmentDirectional(-1, 0), + child: Text( + // '实时监测结果通知'.tr, + title, + style: TextStyle( + fontFamily: 'Inter', + fontSize: 30.rpx, + letterSpacing: 0.0, + color: themeController.currentColor.sc3, + ), ), ), ), - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: MediaQuery.sizeOf(context).width * 0.14, - constraints: BoxConstraints(minWidth: 110.rpx), - child: Text( - "设备ID".tr, - style: TextStyle( - color: stringToColor("#929699"), - fontSize: 26.rpx, + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.sizeOf(context).width * 0.14, + constraints: BoxConstraints(minWidth: 110.rpx), + child: Text( + "设备ID".tr, + style: TextStyle( + color: stringToColor("#929699"), + fontSize: 26.rpx, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), - maxLines: 2, - overflow: TextOverflow.ellipsis, ), - ), - Text( - id, - style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), - ), - ].divide(SizedBox(width: 33.rpx)), - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: MediaQuery.sizeOf(context).width * 0.14, - constraints: BoxConstraints(minWidth: 110.rpx), - child: Text( - "更新时间".tr, - style: TextStyle( - color: stringToColor("#929699"), - fontSize: 26.rpx, + Text( + id, + style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), + ), + ].divide(SizedBox(width: 33.rpx)), + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: MediaQuery.sizeOf(context).width * 0.14, + constraints: BoxConstraints(minWidth: 110.rpx), + child: Text( + "更新时间".tr, + style: TextStyle( + color: stringToColor("#929699"), + fontSize: 26.rpx, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), - maxLines: 2, - overflow: TextOverflow.ellipsis, ), - ), - Text( - time, - style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), - ), - ].divide(SizedBox(width: 33.rpx)), - ), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - width: MediaQuery.sizeOf(context).width * 0.14, - constraints: BoxConstraints(minWidth: 110.rpx), - child: Text( - "设备状态".tr, - style: TextStyle( - color: stringToColor("#929699"), - fontSize: 26.rpx, + Text( + time, + style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), + ), + ].divide(SizedBox(width: 33.rpx)), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: MediaQuery.sizeOf(context).width * 0.14, + constraints: BoxConstraints(minWidth: 110.rpx), + child: Text( + "设备状态".tr, + style: TextStyle( + color: stringToColor("#929699"), + fontSize: 26.rpx, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, ), - maxLines: 2, - overflow: TextOverflow.ellipsis, ), - ), - Expanded( - child: Row( + Row( mainAxisSize: MainAxisSize.max, children: [ if (data['status']['signal'] != null && @@ -1074,16 +554,17 @@ class VitalWidget extends StatelessWidget { data['status']['status'] == 1) ClickableContainer( backgroundColor: Colors.transparent, - highlightColor: Colors.grey, + highlightColor: Colors.grey, // 或根据你主题定制颜色 padding: EdgeInsets.zero, borderRadius: 0, onTap: () { + // 点击事件 showTipDialog( context, Container( child: RichText( text: TextSpan( - text: "信号强度".tr, + text: "信号强度".tr, // 文本前缀部分 style: TextStyle( color: Colors.black, fontSize: @@ -1092,9 +573,10 @@ class VitalWidget extends StatelessWidget { children: [ TextSpan( text: getBedSignal( - data['status']['signal']), + data['status']['signal']), // 状态部分 style: TextStyle( - color: themeController.currentColor.sc2, + color: themeController + .currentColor.sc2, // 同样颜色,也可改成其他颜色 fontSize: AppConstants().title_text_fontSize, ), @@ -1111,6 +593,7 @@ class VitalWidget extends StatelessWidget { ], ); }, + child: Container( width: 30.rpx, height: 24.rpx, @@ -1132,7 +615,7 @@ class VitalWidget extends StatelessWidget { Container( child: RichText( text: TextSpan( - text: "是否在床".tr, + text: "是否在床".tr, // 文本前缀部分 style: TextStyle( color: Colors.black, fontSize: @@ -1140,10 +623,11 @@ class VitalWidget extends StatelessWidget { ), children: [ TextSpan( - text: - getBedStatus(data['status']['inBed']), + text: getBedStatus( + data['status']['inBed']), // 状态部分 style: TextStyle( - color: themeController.currentColor.sc2, + color: themeController + .currentColor.sc2, // 同样颜色,也可改成其他颜色 fontSize: AppConstants().title_text_fontSize, ), @@ -1176,7 +660,7 @@ class VitalWidget extends StatelessWidget { data['status']['status'] == 1) ClickableContainer( backgroundColor: Colors.transparent, - highlightColor: Colors.grey, + highlightColor: Colors.grey, // 可自定义点击水波纹颜色 padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), borderRadius: 0, onTap: () { @@ -1185,13 +669,24 @@ class VitalWidget extends StatelessWidget { Container( child: RichText( text: TextSpan( - text: "设备故障".tr, + text: "设备故障".tr, // 文本前缀部分 style: TextStyle( color: Colors.black, fontSize: AppConstants().title_text_fontSize, ), - children: const [], + children: [ + // TextSpan( + // text:widget + // .device['status']['status'] == 1?"在线".tr:"离线".tr, // 状态部分 + // style: TextStyle( + // color: themeController.currentColor + // .sc2, // 同样颜色,也可改成其他颜色 + // fontSize: AppConstants() + // .title_text_fontSize, + // ), + // ), + ], ), ), ), @@ -1216,7 +711,7 @@ class VitalWidget extends StatelessWidget { data['status']['status'] == 0) ClickableContainer( backgroundColor: Colors.transparent, - highlightColor: Colors.grey, + highlightColor: Colors.grey, // 可替换为点击高亮色 padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), borderRadius: 0, onTap: () { @@ -1225,7 +720,7 @@ class VitalWidget extends StatelessWidget { Container( child: RichText( text: TextSpan( - text: "网络状态".tr, + text: "网络状态".tr, // 文本前缀部分 style: TextStyle( color: Colors.black, fontSize: @@ -1235,9 +730,10 @@ class VitalWidget extends StatelessWidget { TextSpan( text: data['status']['status'] == 1 ? "在线".tr - : "离线".tr, + : "离线".tr, // 状态部分 style: TextStyle( - color: themeController.currentColor.sc2, + color: themeController + .currentColor.sc2, // 同样颜色,也可改成其他颜色 fontSize: AppConstants().title_text_fontSize, ), @@ -1258,222 +754,726 @@ class VitalWidget extends StatelessWidget { width: 27.rpx, height: 27.rpx, child: SvgPicture.asset( + // data['status']['status'] == 1 + // ? 'assets/img/icon/device_online.svg' + // : 'assets/img/icon/device_offline.svg', 'assets/img/icon/device_issue.svg', fit: BoxFit.cover, ), ), ), - Obx(() { - final upgradeInfo = - mhtBlueToothController.localUpgradeMac[data['mac']]; - if (upgradeInfo == null) { - return Container(); - } - final int progress = upgradeInfo?['progress'] ?? -1; - final String status = upgradeInfo?['status'] ?? ''; - // 只有在有升级信息时才显示 - if (mhtBlueToothController.localUpgradeMac - .containsKey(data['mac'])) { - return ClickableContainer( - backgroundColor: Colors.transparent, - highlightColor: Colors.grey, - padding: - EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), - borderRadius: 0, - onTap: () { - if (progress == -1) { - _showUpgradeDialog(context, data['mac']); - } else { - _showCancelDialog(context, data['mac']); - } - }, - child: Row( + if (mhtBlueToothController.localUpgradeMac + .containsKey(data['mac'])) + ClickableContainer( + backgroundColor: Colors.transparent, + highlightColor: Colors.grey, // 可自定义点击效果颜色 + padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), + borderRadius: 0, + onTap: () { + String curCersion = mhtBlueToothController + .localUpgradeMac[data['mac']]!['curversion'] + .toString(); + String newVersion = + mhtBlueToothController.currentUpgradeVersion ?? + ""; + if (mhtBlueToothController + .localUpgradeMac[data['mac']]!['progress'] == + -1) { + showConfirmUpDialog( + context, + Column( + children: [ + SizedBox( + width: 94.rpx, + height: 70.rpx, + child: SvgPicture.asset( + 'assets/img/icon/upgrade.svg', + fit: BoxFit.cover, + ), + ), + Text( + "设备升级".tr, + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + Text( + "当前版本".tr + ":" + "${curCersion}", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + Text( + "最新版本".tr + ":" + "${newVersion}", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + ].divide(SizedBox(height: 37.rpx)), + ), + "".tr, onConfirm: () async { + final deviceData = mhtBlueToothController + .localUpgradeMac[data['mac']]!; + final firmwareUrl = + mhtBlueToothController.currentUpgradeUrl; + + if (firmwareUrl == null) { + TopSlideNotification.show(context, + text: "未获取到固件下载地址".tr); + return; + } + + try { + final scanResult = + deviceData['device'].scanResult; + final thapp = THapp(device: scanResult.device); + + if (!thapp.isConnected) { + await thapp.device.connect(); + } + + await MultiDeviceFirmwareUpdater().startUpgrade( + thapp: thapp, + mac: data['mac'], + firmwareUrl: firmwareUrl, + ); + } catch (e) { + print("升级失败: $e"); + TopSlideNotification.show(context, + text: "升级失败: ${e.toString()}".tr, + textColor: Colors.red); + } + }, + onCancel: () {}, + backgroundColor: Colors.white, + confirmText: "立即升级".tr, + cancelText: "下次再说".tr); + // return; + } else { + showConfirmCancelDialog( + context, + Column( + children: [ + SizedBox( + width: 94.rpx, + height: 70.rpx, + child: SvgPicture.asset( + 'assets/img/icon/upgrade.svg', + fit: BoxFit.cover, + // color: themeController.currentColor.sc3, // 若你想加颜色控制可取消注释 + ), + ), + Text( + "设备升级".tr, + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + Text( + "当前版本".tr + + ":" + + "${mhtBlueToothController.localUpgradeMac[data['mac']]!['curversion']}", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + Text( + "最新版本".tr + ":" + "${newVersion}", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + Text( + "升级进度".tr + + ":" + + "${mhtBlueToothController.localUpgradeMac[data['mac']]!['progress']}" + + "%", + style: TextStyle( + color: stringToColor("#333333"), + fontSize: + AppConstants().title_text_fontSize, + ), + ), + ].divide(SizedBox(height: 37.rpx)), + ), + "".tr, onConfirm: () async { + //todo 取消升级 将进度改为-1 + }, + onCancel: () {}, + backgroundColor: Colors.white, + confirmText: "取消升级".tr, + cancelText: "返回".tr, + confirmButtonColor: stringToColor("#FF7159")); + } + }, + child: Obx(() { + var aa = mhtBlueToothController.isScanning; + print(aa); + return Row( children: [ - // 升级图标 SizedBox( width: 34.rpx, height: 24.rpx, child: SvgPicture.asset( 'assets/img/icon/upgrade.svg', fit: BoxFit.cover, - color: _getUpgradeIconColor(status), + // color: themeController.currentColor.sc3, // 若你想加颜色控制可取消注释 ), ), - SizedBox(width: 10.rpx), - // 进度数字和状态指示 - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - // 进度百分比 - if (progress >= 0 && progress <= 100) - Text( - "$progress%", - style: TextStyle( - color: _getProgressTextColor(progress), - fontSize: 26.rpx, - fontWeight: FontWeight.bold, - ), - ), - ], - ), - ], - ), - ); - } - return Container(); - }), - ].divide(SizedBox(width: 50.rpx)), // 减少图标间距 + if ((mhtBlueToothController.localUpgradeMac[ + data['mac']]!['progress']) != + -1) + Text( + "${mhtBlueToothController.localUpgradeMac[data['mac']]!['progress']}" + + "%", + style: TextStyle( + color: Colors.white, + fontSize: 26.rpx, + ), + ), + ].divide(SizedBox( + width: 10.rpx, + )), + ); + }), + ), + ].divide(SizedBox(width: 50.rpx)), ), - ), - ].divide(SizedBox(width: 34.rpx)), - ), - ].divide(SizedBox(height: 20.rpx)), - ), + ].divide(SizedBox(width: 34.rpx)), + ), + ].divide( + SizedBox(height: 20.rpx), + )), ); } - - // 获取状态文本 - String _getStatusText(String status) { - switch (status) { - case 'waiting': - return '等待'.tr; - case 'downloading': - return '下载'.tr; - case 'upgrading': - return '升级'.tr; - case 'completed': - return '完成'.tr; - case 'failed': - return '失败'.tr; - case 'cancelled': - return '取消'.tr; - default: - return status; - } - } - - // 获取状态文字颜色 - Color _getStatusTextColor(String status) { - switch (status) { - case 'completed': - return Colors.green; - case 'failed': - return Colors.red; - case 'cancelled': - return Colors.orange; - default: - return Colors.blue; - } - } - - // 获取进度文字颜色 - Color _getProgressTextColor(int progress) { - if (progress == 100) return Colors.green; - if (progress < 0) return Colors.red; - return Colors.white; - } - - // 获取升级图标颜色 - Color _getUpgradeIconColor(String status) { - switch (status) { - case 'completed': - return Colors.green; - case 'failed': - return Colors.red; - case 'cancelled': - return Colors.orange; - default: - return themeController.currentColor.sc3; - } - } - - // 显示升级对话框 - void _showUpgradeDialog(BuildContext context, String mac) { - MHTBlueToothController mhtBlueToothController = Get.find(); - showConfirmUpDialog( - context, - Column( - children: [ - SizedBox( - width: 94.rpx, - height: 70.rpx, - child: SvgPicture.asset( - 'assets/img/icon/upgrade.svg', - fit: BoxFit.cover, - ), - ), - Text( - "设备升级".tr, - style: TextStyle( - color: stringToColor("#333333"), - fontSize: AppConstants().title_text_fontSize, - ), - ), - ].divide(SizedBox(height: 37.rpx)), - ), - "", onConfirm: () async { - final deviceData = mhtBlueToothController.localUpgradeMac[mac]!; - final firmwareUrl = mhtBlueToothController.currentUpgradeUrl; - if (firmwareUrl == null) { - TopSlideNotification.show(context, text: "未获取到固件下载地址".tr); - return; - } - try { - final scanResult = deviceData['device'].scanResult; - final thapp = THapp(device: scanResult.device); - if (!thapp.isConnected) { - await thapp.device.connect(); - } - await MultiDeviceFirmwareUpdater().startUpgrade( - thapp: thapp, - mac: mac, - firmwareUrl: firmwareUrl, - ); - } catch (e) { - TopSlideNotification.show(context, - text: "升级失败: ${e.toString()}".tr, textColor: Colors.red); - } - }, - onCancel: () {}, - backgroundColor: Colors.white, - confirmText: "立即升级".tr, - cancelText: "下次再说".tr); - } - - // 显示取消对话框 - void _showCancelDialog(BuildContext context, String mac) { - showConfirmCancelDialog( - context, - Column( - children: [ - Text( - "确认取消升级".tr, - style: TextStyle( - color: stringToColor("#333333"), - fontSize: AppConstants().title_text_fontSize, - ), - ), - Text( - "确定要取消设备 $mac 的升级吗?".tr, - style: TextStyle( - color: stringToColor("#333333"), - fontSize: AppConstants().normal_text_fontSize, - ), - ), - ], - ), - "", onConfirm: () { - MultiDeviceFirmwareUpdater().cancelUpgrade(mac); - }, - onCancel: () {}, - backgroundColor: Colors.white, - confirmText: "确认取消".tr, - cancelText: "继续升级".tr, - confirmButtonColor: Colors.red); - } } +// class VitalWidget extends StatelessWidget { +// final String title; +// final Map data; + +// const VitalWidget({ +// super.key, +// required this.title, +// required this.data, +// }); + +// @override +// Widget build(BuildContext context) { +// MHTBlueToothController mhtBlueToothController = Get.find(); +// final String id = data['mac'.tr] ?? '--'; +// final int? timestamp = data['status']['updateTime']; +// final String time = (timestamp != null) +// ? DateFormat('yyyy-MM-dd HH:mm') +// .format(DateTime.fromMillisecondsSinceEpoch(timestamp)) +// : '--'; + +// return ClickableContainer( +// backgroundColor: Color(0xFF003058), +// highlightColor: Color(0xFF055466), +// borderRadius: 20.rpx, +// padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 30.rpx, 30.rpx, 40.rpx), +// onTap: () {}, +// child: Column( +// mainAxisSize: MainAxisSize.max, +// children: [ +// Container( +// width: double.infinity, +// child: Align( +// alignment: AlignmentDirectional(-1, 0), +// child: Text( +// title, +// style: TextStyle( +// fontFamily: 'Inter', +// fontSize: 30.rpx, +// letterSpacing: 0.0, +// color: themeController.currentColor.sc3, +// ), +// ), +// ), +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// width: MediaQuery.sizeOf(context).width * 0.14, +// constraints: BoxConstraints(minWidth: 110.rpx), +// child: Text( +// "设备ID".tr, +// style: TextStyle( +// color: stringToColor("#929699"), +// fontSize: 26.rpx, +// ), +// maxLines: 2, +// overflow: TextOverflow.ellipsis, +// ), +// ), +// Text( +// id, +// style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), +// ), +// ].divide(SizedBox(width: 33.rpx)), +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Container( +// width: MediaQuery.sizeOf(context).width * 0.14, +// constraints: BoxConstraints(minWidth: 110.rpx), +// child: Text( +// "更新时间".tr, +// style: TextStyle( +// color: stringToColor("#929699"), +// fontSize: 26.rpx, +// ), +// maxLines: 2, +// overflow: TextOverflow.ellipsis, +// ), +// ), +// Text( +// time, +// style: TextStyle(fontSize: 26.rpx, color: Color(0xFFFFFFFF)), +// ), +// ].divide(SizedBox(width: 33.rpx)), +// ), +// Row( +// mainAxisSize: MainAxisSize.max, +// children: [ +// Container( +// width: MediaQuery.sizeOf(context).width * 0.14, +// constraints: BoxConstraints(minWidth: 110.rpx), +// child: Text( +// "设备状态".tr, +// style: TextStyle( +// color: stringToColor("#929699"), +// fontSize: 26.rpx, +// ), +// maxLines: 2, +// overflow: TextOverflow.ellipsis, +// ), +// ), +// Expanded( +// child: Row( +// mainAxisSize: MainAxisSize.max, +// children: [ +// if (data['status']['signal'] != null && +// data['status']['signal'] != -1 && +// data['status']['status'] != null && +// data['status']['status'] == 1) +// ClickableContainer( +// backgroundColor: Colors.transparent, +// highlightColor: Colors.grey, +// padding: EdgeInsets.zero, +// borderRadius: 0, +// onTap: () { +// showTipDialog( +// context, +// Container( +// child: RichText( +// text: TextSpan( +// text: "信号强度".tr, +// style: TextStyle( +// color: Colors.black, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// children: [ +// TextSpan( +// text: getBedSignal( +// data['status']['signal']), +// style: TextStyle( +// color: themeController.currentColor.sc2, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// ), +// ], +// ), +// ), +// ), +// backgroundColor: Color(0xFFFFFFFF), +// colors: [ +// Color(0XFF1592AA), +// Color(0xFF0C83A7), +// Color(0xFF006FA3) +// ], +// ); +// }, +// child: Container( +// width: 30.rpx, +// height: 24.rpx, +// child: Image.asset( +// 'assets/img/signal${_getSignalLevel(data['status']['signal'])}.png'), +// ), +// ), +// if (data['status']['inBed'] != null && +// data['status']['status'] != null && +// data['status']['status'] == 1) +// ClickableContainer( +// backgroundColor: Colors.transparent, +// highlightColor: Colors.grey, +// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), +// borderRadius: 0, +// onTap: () { +// showTipDialog( +// context, +// Container( +// child: RichText( +// text: TextSpan( +// text: "是否在床".tr, +// style: TextStyle( +// color: Colors.black, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// children: [ +// TextSpan( +// text: +// getBedStatus(data['status']['inBed']), +// style: TextStyle( +// color: themeController.currentColor.sc2, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// ), +// ], +// ), +// ), +// ), +// backgroundColor: Color(0xFFFFFFFF), +// colors: [ +// Color(0XFF1592AA), +// Color(0xFF0C83A7), +// Color(0xFF006FA3) +// ], +// ); +// }, +// child: SizedBox( +// width: 16.rpx, +// height: 36.rpx, +// child: SvgPicture.asset( +// data['status']['inBed'] == 0 +// ? 'assets/img/icon/not_bed.svg' +// : 'assets/img/icon/in_bed.svg', +// fit: BoxFit.fill, +// ), +// ), +// ), +// if (data['status']['failure'] != 0 && +// data['status']['status'] != null && +// data['status']['status'] == 1) +// ClickableContainer( +// backgroundColor: Colors.transparent, +// highlightColor: Colors.grey, +// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), +// borderRadius: 0, +// onTap: () { +// showTipDialog( +// context, +// Container( +// child: RichText( +// text: TextSpan( +// text: "设备故障".tr, +// style: TextStyle( +// color: Colors.black, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// children: const [], +// ), +// ), +// ), +// backgroundColor: Color(0xFFFFFFFF), +// colors: [ +// Color(0XFF1592AA), +// Color(0xFF0C83A7), +// Color(0xFF006FA3) +// ], +// ); +// }, +// child: SizedBox( +// width: 27.rpx, +// height: 27.rpx, +// child: SvgPicture.asset( +// 'assets/img/icon/device_issue.svg', +// fit: BoxFit.cover, +// ), +// ), +// ), +// if (data['status']['status'] != null && +// data['status']['status'] == 0) +// ClickableContainer( +// backgroundColor: Colors.transparent, +// highlightColor: Colors.grey, +// padding: EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), +// borderRadius: 0, +// onTap: () { +// showTipDialog( +// context, +// Container( +// child: RichText( +// text: TextSpan( +// text: "网络状态".tr, +// style: TextStyle( +// color: Colors.black, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// children: [ +// TextSpan( +// text: data['status']['status'] == 1 +// ? "在线".tr +// : "离线".tr, +// style: TextStyle( +// color: themeController.currentColor.sc2, +// fontSize: +// AppConstants().title_text_fontSize, +// ), +// ), +// ], +// ), +// ), +// ), +// backgroundColor: Color(0xFFFFFFFF), +// colors: [ +// Color(0XFF1592AA), +// Color(0xFF0C83A7), +// Color(0xFF006FA3) +// ], +// ); +// }, +// child: SizedBox( +// width: 27.rpx, +// height: 27.rpx, +// child: SvgPicture.asset( +// 'assets/img/icon/device_issue.svg', +// fit: BoxFit.cover, +// ), +// ), +// ), +// Obx(() { +// final upgradeInfo = +// mhtBlueToothController.localUpgradeMac[data['mac']]; +// if (upgradeInfo == null) { +// return Container(); +// } +// final int progress = upgradeInfo?['progress'] ?? -1; +// final String status = upgradeInfo?['status'] ?? ''; +// // 只有在有升级信息时才显示 +// if (mhtBlueToothController.localUpgradeMac +// .containsKey(data['mac'])) { +// return ClickableContainer( +// backgroundColor: Colors.transparent, +// highlightColor: Colors.grey, +// padding: +// EdgeInsetsDirectional.fromSTEB(0, 0.rpx, 0, 0), +// borderRadius: 0, +// onTap: () { +// if (progress == -1) { +// _showUpgradeDialog(context, data['mac']); +// } else { +// _showCancelDialog(context, data['mac']); +// } +// }, +// child: Row( +// children: [ +// // 升级图标 +// SizedBox( +// width: 34.rpx, +// height: 24.rpx, +// child: SvgPicture.asset( +// 'assets/img/icon/upgrade.svg', +// fit: BoxFit.cover, +// color: _getUpgradeIconColor(status), +// ), +// ), +// SizedBox(width: 10.rpx), +// // 进度数字和状态指示 +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisSize: MainAxisSize.min, +// children: [ +// // 进度百分比 +// if (progress >= 0 && progress <= 100) +// Text( +// "$progress%", +// style: TextStyle( +// color: _getProgressTextColor(progress), +// fontSize: 26.rpx, +// fontWeight: FontWeight.bold, +// ), +// ), +// ], +// ), +// ], +// ), +// ); +// } +// return Container(); +// }), +// ].divide(SizedBox(width: 50.rpx)), // 减少图标间距 +// ), +// ), +// ].divide(SizedBox(width: 34.rpx)), +// ), +// ].divide(SizedBox(height: 20.rpx)), +// ), +// ); +// } + +// // 获取状态文本 +// String _getStatusText(String status) { +// switch (status) { +// case 'waiting': +// return '等待'.tr; +// case 'downloading': +// return '下载'.tr; +// case 'upgrading': +// return '升级'.tr; +// case 'completed': +// return '完成'.tr; +// case 'failed': +// return '失败'.tr; +// case 'cancelled': +// return '取消'.tr; +// default: +// return status; +// } +// } + +// // 获取状态文字颜色 +// Color _getStatusTextColor(String status) { +// switch (status) { +// case 'completed': +// return Colors.green; +// case 'failed': +// return Colors.red; +// case 'cancelled': +// return Colors.orange; +// default: +// return Colors.blue; +// } +// } + +// // 获取进度文字颜色 +// Color _getProgressTextColor(int progress) { +// if (progress == 100) return Colors.green; +// if (progress < 0) return Colors.red; +// return Colors.white; +// } + +// // 获取升级图标颜色 +// Color _getUpgradeIconColor(String status) { +// switch (status) { +// case 'completed': +// return Colors.green; +// case 'failed': +// return Colors.red; +// case 'cancelled': +// return Colors.orange; +// default: +// return themeController.currentColor.sc3; +// } +// } + +// // 显示升级对话框 +// void _showUpgradeDialog(BuildContext context, String mac) { +// MHTBlueToothController mhtBlueToothController = Get.find(); +// showConfirmUpDialog( +// context, +// Column( +// children: [ +// SizedBox( +// width: 94.rpx, +// height: 70.rpx, +// child: SvgPicture.asset( +// 'assets/img/icon/upgrade.svg', +// fit: BoxFit.cover, +// ), +// ), +// Text( +// "设备升级".tr, +// style: TextStyle( +// color: stringToColor("#333333"), +// fontSize: AppConstants().title_text_fontSize, +// ), +// ), +// ].divide(SizedBox(height: 37.rpx)), +// ), +// "", onConfirm: () async { +// final deviceData = mhtBlueToothController.localUpgradeMac[mac]!; +// final firmwareUrl = mhtBlueToothController.currentUpgradeUrl; +// if (firmwareUrl == null) { +// TopSlideNotification.show(context, text: "未获取到固件下载地址".tr); +// return; +// } +// try { +// final scanResult = deviceData['device'].scanResult; +// final thapp = THapp(device: scanResult.device); +// if (!thapp.isConnected) { +// await thapp.device.connect(); +// } +// await MultiDeviceFirmwareUpdater().startUpgrade( +// thapp: thapp, +// mac: mac, +// firmwareUrl: firmwareUrl, +// ); +// } catch (e) { +// TopSlideNotification.show(context, +// text: "升级失败: ${e.toString()}".tr, textColor: Colors.red); +// } +// }, +// onCancel: () {}, +// backgroundColor: Colors.white, +// confirmText: "立即升级".tr, +// cancelText: "下次再说".tr); +// } + +// // 显示取消对话框 +// void _showCancelDialog(BuildContext context, String mac) { +// showConfirmCancelDialog( +// context, +// Column( +// children: [ +// Text( +// "确认取消升级".tr, +// style: TextStyle( +// color: stringToColor("#333333"), +// fontSize: AppConstants().title_text_fontSize, +// ), +// ), +// Text( +// "确定要取消设备 $mac 的升级吗?".tr, +// style: TextStyle( +// color: stringToColor("#333333"), +// fontSize: AppConstants().normal_text_fontSize, +// ), +// ), +// ], +// ), +// "", onConfirm: () { +// MultiDeviceFirmwareUpdater().cancelUpgrade(mac); +// }, +// onCancel: () {}, +// backgroundColor: Colors.white, +// confirmText: "确认取消".tr, +// cancelText: "继续升级".tr, +// confirmButtonColor: Colors.red); +// } +// } + getBedSignal(signal) { if (signal <= 1) { return "较弱".tr; diff --git a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart index 3c3fcea..48928f0 100644 --- a/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart +++ b/lib/pages/sleep_report/component/ZiZhuShenJingPercentWidget.dart @@ -121,7 +121,7 @@ class _ZiZhuShenJingPercentWidgetState context, Container( child: Text( - "自主神经平衡指数是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。" + "自主神经平衡指数 是评估人体自主神经系统(ANS)功能状态的重要指标,主要反映交感神经和副交感神经的活性平衡关系。" .tr, style: TextStyle( fontSize: 26.rpx,