1.修复睡眠日报中睡眠规律性数据显示错误

2.更新时区设置
This commit is contained in:
wyf
2026-01-07 15:19:16 +08:00
parent 36f19a71eb
commit 575f91e8dd
42 changed files with 4236 additions and 1653 deletions

View File

@@ -104,54 +104,41 @@ class _SleepCardState extends State<SleepCard> with TickerProviderStateMixin {
.where((item) => item['show'] != false)
.toList();
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius:
BorderRadius.circular(AppConstants().normal_container_radius),
),
child: Padding(
padding:
EdgeInsetsDirectional.fromSTEB(26.rpx, 29.rpx, 26.rpx, 45.rpx),
child: Wrap(
alignment: WrapAlignment.center,
spacing: 23.rpx,
runSpacing: 25.rpx,
children: List.generate(data.length, (index) {
final item = data[index];
item['showTip'] = true;
final bool isHighlighted =
_shouldAnimate && item['id'] == _highlightedId;
return SizedBox(
width: (MediaQuery.of(context).size.width - 160.rpx) / num,
child: AnimatedBuilder(
animation: _animationController ?? AlwaysStoppedAnimation(0),
builder: (context, child) {
return Container(
key: isHighlighted ? _highlightKey : null,
decoration: isHighlighted
? BoxDecoration(
border: Border.all(
color: themeController.currentColor.sc2
.withOpacity(
_animationController?.value ?? 0),
width: 1.rpx,
),
borderRadius: BorderRadius.circular(8),
)
: null,
child: SleepDataModuleWidget(
data: item,
sleepReportData: widget.sleepReport,
),
);
},
),
);
}),
),
),
return Wrap(
alignment: WrapAlignment.spaceBetween,
spacing: 23.rpx,
runSpacing: 25.rpx,
children: List.generate(data.length, (index) {
final item = data[index];
item['showTip'] = true;
final bool isHighlighted =
_shouldAnimate && item['id'] == _highlightedId;
return SizedBox(
width: (MediaQuery.of(context).size.width - 120.rpx) / num,
child: AnimatedBuilder(
animation: _animationController ?? AlwaysStoppedAnimation(0),
builder: (context, child) {
return Container(
key: isHighlighted ? _highlightKey : null,
decoration: isHighlighted
? BoxDecoration(
border: Border.all(
color: themeController.currentColor.sc2
.withOpacity(_animationController?.value ?? 0),
width: 1.rpx,
),
borderRadius: BorderRadius.circular(8),
)
: null,
child: SleepDataModuleWidget(
data: item,
sleepReportData: widget.sleepReport,
),
);
},
),
);
}),
);
} catch (e) {
es.EasyDartModule.logger.error("数据卡片渲染异常${e}");