更新睡眠报告

This commit is contained in:
wyf
2025-05-27 23:09:31 +08:00
parent e0fef11b33
commit 98cd7f4e6a
54 changed files with 4450 additions and 1160 deletions

View File

@@ -101,76 +101,51 @@ class _SleepDataModuleWidgetState extends State<SleepDataModuleWidget> {
),
],
),
// Container(
// width: MediaQuery.sizeOf(context).width * 0.07,
// height: MediaQuery.sizeOf(context).height * 0.014,
// constraints: BoxConstraints(
// minWidth: 43.rpx,
// minHeight: 36.rpx,
// ),
// child: FFButtonWidget(
// onPressed: () {
// print('Button pressed ...');
// },
// // text: '${widget.data['level']}',
// text: '${widget.data['level']}',
// options: FFButtonOptions(
// height: 40.rpx,
// padding: EdgeInsets.zero,
// // color: themeController.currentColor.sc14,
// color: stringToColor('${widget.data['color']}'),
// textStyle:
// FlutterFlowTheme.of(context).titleSmall.override(
// fontFamily: 'Inter Tight',
// color: themeController.currentColor.sc3,
// // color: stringToColor('${widget.data['color']}'),
// letterSpacing: 0.0,
// fontSize: 15.rpx,
// ),
// elevation: 0,
// borderRadius: BorderRadius.circular(8.rpx),
// ),
// ),
// ),
ClickableContainer(
backgroundColor: stringToColor('${widget.data['color']}'),
highlightColor: themeController.currentColor.sc3,
padding: EdgeInsets.symmetric(
horizontal: 0.rpx,
vertical: 0.rpx,
),
borderRadius: 8.rpx,
onTap: () {
print('Button pressed ...');
},
child: Container(
alignment: Alignment.center,
constraints: BoxConstraints(
minWidth: 43.rpx,
minHeight: 36.rpx,
if (widget.data['level'] != null)
ClickableContainer(
backgroundColor: (widget.data['color'] == null ||
widget.data['color'].toString().isEmpty)
? Colors.transparent
: stringToColor(widget.data['color']),
highlightColor: themeController.currentColor.sc3,
padding: EdgeInsets.symmetric(
horizontal: 0.rpx,
vertical: 0.rpx,
),
child: Text(
'${widget.data['level']}',
style: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Inter Tight',
color: themeController.currentColor.sc3,
letterSpacing: 0.0,
fontSize: 15.rpx,
),
borderRadius: 8.rpx,
onTap: () {
print('Button pressed ...');
},
child: Container(
alignment: Alignment.center,
constraints: BoxConstraints(
minWidth: 43.rpx,
minHeight: 36.rpx,
),
child: Text(
'${widget.data['level']}',
style: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: 'Inter Tight',
color: themeController.currentColor.sc3,
letterSpacing: 0.0,
fontSize: 15.rpx,
),
),
),
),
),
].divide(SizedBox(width: 0.rpx)),
),
Text(
'${widget.data['range']}',
"正常值".tr +
'${(widget.data['range'] ?? '').toString().isEmpty ? '未知数据'.tr : widget.data['range']}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: AppConstants().small_text_fontSize,
letterSpacing: 0.0,
color: themeController.currentColor.sc4,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
],
),