feat: Cupertino滚轮选择器 + 品牌更名 + UI全面优化

- 日期/时间/次数选择器统一改为底部弹出Cupertino滚轮,无单位标签,双横线选区
- App更名为"小脉健康",副标题"血管病患者的AI健康管理助手"
- 健康仪表盘及侧边栏移除体重指标,侧边栏背景改为蓝白渐变
- 健康档案按钮移入功能入口网格,与其他入口样式统一
- 记数据智能体配色改为绿色渐变(#A1FFCE→#69DB8F)
- 隐私协议/关于页从Text改为MarkdownBody正确渲染
- 运动计划/饮食记录卡片添加边框和阴影
- 服药次数从chip改为滚轮选择器
- 日期显示格式统一为空格分隔(1999 01 01)
- 健康档案页背景改为纯白
This commit is contained in:
MingNian
2026-06-22 13:59:37 +08:00
parent a479e5e95d
commit 431b72d49a
15 changed files with 466 additions and 165 deletions

View File

@@ -26,7 +26,6 @@ class _TrendPageState extends ConsumerState<TrendPage> {
{'key': 'heart_rate', 'label': '心率', 'color': Color(0xFFF59E0B)},
{'key': 'glucose', 'label': '血糖', 'color': Color(0xFF4F6EF7)},
{'key': 'spo2', 'label': '血氧', 'color': Color(0xFF20C997)},
{'key': 'weight', 'label': '体重', 'color': Color(0xFF845EF7)},
];
static const _units = {
@@ -34,7 +33,6 @@ class _TrendPageState extends ConsumerState<TrendPage> {
'heart_rate': 'bpm',
'glucose': 'mmol/L',
'spo2': '%',
'weight': 'kg',
};
static const _names = {
@@ -42,7 +40,6 @@ class _TrendPageState extends ConsumerState<TrendPage> {
'heart_rate': '心率',
'glucose': '血糖',
'spo2': '血氧',
'weight': '体重',
};
String get _unit => _units[_selected] ?? '';
@@ -62,7 +59,7 @@ class _TrendPageState extends ConsumerState<TrendPage> {
setState(() => _loading = true);
try {
final api = ref.read(apiClientProvider);
final types = ['BloodPressure', 'HeartRate', 'Glucose', 'SpO2', 'Weight'];
final types = ['BloodPressure', 'HeartRate', 'Glucose', 'SpO2'];
final all = <Map<String, dynamic>>[];
for (final t in types) {
try {
@@ -112,9 +109,7 @@ class _TrendPageState extends ConsumerState<TrendPage> {
? 'HeartRate'
: _selected == 'glucose'
? 'Glucose'
: _selected == 'spo2'
? 'SpO2'
: 'Weight';
: 'SpO2';
setState(() {
_filtered = _allRecords.where((r) => r['type'] == typeName).toList();
_filtered.sort(
@@ -204,9 +199,7 @@ class _TrendPageState extends ConsumerState<TrendPage> {
? 'HeartRate'
: _selected == 'glucose'
? 'Glucose'
: _selected == 'spo2'
? 'SpO2'
: 'Weight',
: 'SpO2',
'source': 'Manual',
'recordedAt': DateTime.now().toUtc().toIso8601String(),
'unit': _unit,
@@ -679,8 +672,6 @@ class _TrendPageState extends ConsumerState<TrendPage> {
return '🩸';
case 'spo2':
return '🫁';
case 'weight':
return '⚖️';
default:
return '📊';
}