## UI 配色 - 健康仪表盘: 背景从蓝紫粉三色渐变改为 #4FACFE 纯色蓝, 白字清晰不抢眼 - app_colors / app_design_tokens / app_theme: 配色体系微调 - 多个 widget 和页面跟随配色更新(health_drawer/admin_drawer/doctor_drawer/enterprise_widgets 等) ## 登录页品牌升级 - 新增品牌素材: drawer_background_v2 / login_background_v2 / health_login_character_transparent - login_page 重构, 接入新品牌视觉 - app.dart 启动流程调整 ## iOS / Android 配置 - Info.plist: 权限描述调整 - AppIcon / LaunchImage: 资源更新 - AndroidManifest: 权限微调 ## 隐私文案修订 - privacy.html: 蓝牙设备描述调整为"标准蓝牙血压服务", 移除未上线设备类型表述 - terms.html: 移除"在线医生咨询"相关条款, 服务范围收窄 ## 通知中心 - notification_center_page: 重构通知项布局 ## 其他 - 删除已完成的计划/spec 文档(ui-system-first-pass / apple-sign-in / secondary-page-color-refresh / notification-preferences-design / ui-design-system) - 新增 native_navigation_test - 新增 HANDOFF 交接文档 - home_message_order_test 更新 - .gitignore 调整
150 lines
4.4 KiB
Dart
150 lines
4.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../core/app_colors.dart';
|
|
import '../core/app_design_tokens.dart';
|
|
import '../core/app_module_visuals.dart';
|
|
import '../models/bp_reading.dart';
|
|
|
|
Future<void> showBleSyncDialog(
|
|
BuildContext context, {
|
|
required BpReading reading,
|
|
}) {
|
|
return showDialog<void>(
|
|
context: context,
|
|
barrierDismissible: false,
|
|
barrierColor: Colors.black.withValues(alpha: 0.54),
|
|
builder: (ctx) => Dialog(
|
|
insetPadding: const EdgeInsets.symmetric(horizontal: 28),
|
|
backgroundColor: Colors.transparent,
|
|
child: Container(
|
|
width: double.infinity,
|
|
constraints: const BoxConstraints(maxWidth: 380),
|
|
padding: const EdgeInsets.fromLTRB(22, 26, 22, 22),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: AppRadius.xlBorder,
|
|
boxShadow: AppShadows.floating,
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
width: 48,
|
|
height: 48,
|
|
decoration: BoxDecoration(
|
|
gradient: AppModuleVisuals.device.gradient,
|
|
borderRadius: AppRadius.mdBorder,
|
|
),
|
|
child: Icon(
|
|
AppModuleVisuals.device.icon,
|
|
color: Colors.white,
|
|
size: 25,
|
|
),
|
|
),
|
|
const SizedBox(height: 14),
|
|
Text(
|
|
'数据已录入',
|
|
textAlign: TextAlign.center,
|
|
style: AppTextStyles.summaryTitle.copyWith(fontSize: 22),
|
|
),
|
|
const SizedBox(height: 22),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: _MetricCard(
|
|
label: '收缩压',
|
|
value: '${reading.systolic}',
|
|
unit: 'mmHg',
|
|
),
|
|
),
|
|
const SizedBox(width: 14),
|
|
Expanded(
|
|
child: _MetricCard(
|
|
label: '舒张压',
|
|
value: '${reading.diastolic}',
|
|
unit: 'mmHg',
|
|
),
|
|
),
|
|
],
|
|
),
|
|
if (reading.pulse != null) ...[
|
|
const SizedBox(height: 14),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: _MetricCard(
|
|
label: '脉搏',
|
|
value: '${reading.pulse}',
|
|
unit: 'bpm',
|
|
),
|
|
),
|
|
const Expanded(child: SizedBox.shrink()),
|
|
],
|
|
),
|
|
],
|
|
const SizedBox(height: 26),
|
|
GestureDetector(
|
|
onTap: () => Navigator.pop(ctx),
|
|
child: Container(
|
|
height: 50,
|
|
width: double.infinity,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
gradient: AppModuleVisuals.device.gradient,
|
|
borderRadius: AppRadius.lgBorder,
|
|
boxShadow: AppColors.buttonShadow,
|
|
),
|
|
child: Text(
|
|
'知道了',
|
|
style: AppTextStyles.button.copyWith(color: Colors.white),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
class _MetricCard extends StatelessWidget {
|
|
final String label;
|
|
final String value;
|
|
final String unit;
|
|
|
|
const _MetricCard({
|
|
required this.label,
|
|
required this.value,
|
|
required this.unit,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
|
decoration: BoxDecoration(
|
|
color: AppModuleVisuals.device.lightColor,
|
|
borderRadius: AppRadius.mdBorder,
|
|
border: Border.all(color: AppModuleVisuals.device.borderColor),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
value,
|
|
style: const TextStyle(
|
|
fontSize: 36,
|
|
fontWeight: FontWeight.w700,
|
|
color: AppColors.textPrimary,
|
|
height: 1,
|
|
),
|
|
),
|
|
const SizedBox(height: 6),
|
|
Text(unit, style: AppTextStyles.tag),
|
|
const SizedBox(height: 4),
|
|
Text(label, style: AppTextStyles.tag),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|