This commit is contained in:
wyf
2025-05-23 14:51:09 +08:00
parent 8a418c9c98
commit c650bad8b1
36 changed files with 1297 additions and 892 deletions

View File

@@ -40,7 +40,7 @@ class DynamicReportDetailWidget extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
_buildHeader(context),
_buildHeader(context,targetDevice),
SizedBox(
height: 33.rpx,
),
@@ -54,21 +54,30 @@ class DynamicReportDetailWidget extends StatelessWidget {
);
}
Widget _buildHeader(BuildContext context) {
Widget _buildHeader(BuildContext context, Map targetDevice) {
return Container(
width: double.infinity,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${targetDevice['person']?['name'] == null ? '未命名'.tr : targetDevice['person']['name']}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: themeController.currentColor.sc3.withOpacity(0.2),
borderRadius: 0,
padding: EdgeInsets.zero,
onTap: () async {
await Get.toNamed("/bodyDevice",arguments: targetDevice);
},
child: Text(
'${targetDevice['person']?['name'] == null ? '未命名'.tr : targetDevice['person']['name']}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
ClickableContainer(
backgroundColor: Colors.transparent,
@@ -136,16 +145,11 @@ class DynamicReportDetailWidget extends StatelessWidget {
}
Widget _buildSleepDataModuleWidgets() {
// bool hasData = sleepDataModuleWidgets.any((w) {
// final data = w.data;
// return data['state'] != null &&
// data['state'].toString().trim().isNotEmpty;
// });
bool hasData = sleepDataModuleWidgets.length > 0;
if (!hasData) {
return Container(
height: 100.rpx,
height: 200.rpx,
alignment: Alignment.center,
child: Text(
'暂无数据'.tr,
@@ -160,6 +164,7 @@ class DynamicReportDetailWidget extends StatelessWidget {
return Container(
width: double.infinity,
height: 200.rpx,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(

View File

@@ -63,6 +63,8 @@ class _SleepDataModuleWidgetState extends State<SleepDataModuleWidget> {
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Row(
mainAxisSize: MainAxisSize.max,
@@ -80,6 +82,8 @@ class _SleepDataModuleWidgetState extends State<SleepDataModuleWidget> {
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 10.rpx),
@@ -91,6 +95,8 @@ class _SleepDataModuleWidgetState extends State<SleepDataModuleWidget> {
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],

View File

@@ -113,11 +113,13 @@ class _SleepDateWidgetState extends State<SleepDateWidget> {
Text(
(widget.score?.isEmpty ?? true) ? '--' : widget.score!,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
color: widget.textColor ??
themeController.currentColor.sc4),
fontFamily: 'Inter',
fontSize: 48.rpx,
letterSpacing: 0.0,
color: widget.textColor ??
themeController.currentColor.sc4,
fontWeight: FontWeight.bold, // 加粗
),
),
if ((widget.score?.trim().isNotEmpty ?? false))
Padding(

View File

@@ -52,7 +52,7 @@ class SelectableTagButton extends StatelessWidget {
? null
: Border.all(
color: themeController.currentColor.sc4,
width: 1.rpx,
width: 0.5.rpx,
), // 未选中时无边框
borderRadius: BorderRadius.circular(12.0), // 如果需要圆角
),

View File

@@ -220,7 +220,7 @@ getDeviceWifiStatus(THapp tHapp, int times) async {
}
}
Future<String> getDeviceNetVersion(THapp tHapp, int times) async {
Future<String> getDeviceNetVersion(THapp tHapp, int times) async {
edm.EasyDartModule.logger.info("发送请求设备的网络信息");
DailyLogUtils.writeLog("发送请求设备的网络信息");
print("ls /root/mnt");
@@ -237,6 +237,8 @@ getDeviceWifiStatus(THapp tHapp, int times) async {
netType = "wifi";
} else if (log.contains("a76xx.json")) {
netType = "4g";
} else {
netType = "unknown";
}
ss.over = true;
ss.result = netType;