Files
AI-Health/health_app/lib/widgets/enterprise_widgets.dart
MingNian 6e5d3e64cd feat: 健康仪表盘配色调整 + 登录页品牌升级 + iOS 配置 + 隐私文案修订 + 文档清理
## 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 调整
2026-07-16 22:30:23 +08:00

160 lines
4.5 KiB
Dart

import 'package:flutter/material.dart';
import '../core/app_colors.dart';
import '../core/app_design_tokens.dart';
class EnterpriseStat {
final String label;
final String value;
final IconData? icon;
const EnterpriseStat({required this.label, required this.value, this.icon});
}
class EnterpriseHeader extends StatelessWidget {
final String title;
final String subtitle;
final IconData icon;
final Color color;
final Color accent;
final List<EnterpriseStat> stats;
final Widget? trailing;
final bool showIcon;
const EnterpriseHeader({
super.key,
required this.title,
required this.subtitle,
required this.icon,
required this.color,
required this.accent,
this.stats = const [],
this.trailing,
this.showIcon = true,
});
@override
Widget build(BuildContext context) {
return Container(
padding: AppSpacing.panel,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: AppRadius.lgBorder,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
if (showIcon) ...[
Container(
width: 42,
height: 42,
decoration: BoxDecoration(
color: color.withValues(alpha: 0.10),
borderRadius: AppRadius.smBorder,
),
child: Icon(icon, color: color, size: 22),
),
const SizedBox(width: 12),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: AppTextStyles.summaryTitle,
),
const SizedBox(height: 3),
Text(
subtitle,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: AppTextStyles.summarySubtitle,
),
],
),
),
if (trailing != null) ...[const SizedBox(width: 10), trailing!],
],
),
if (stats.isNotEmpty) ...[
const SizedBox(height: 14),
Row(
children: [
for (var i = 0; i < stats.length; i++) ...[
Expanded(
child: _HeaderStat(
stat: stats[i],
color: i.isEven ? color : accent,
),
),
if (i != stats.length - 1) const SizedBox(width: 8),
],
],
),
],
],
),
);
}
}
class _HeaderStat extends StatelessWidget {
final EnterpriseStat stat;
final Color color;
const _HeaderStat({required this.stat, required this.color});
@override
Widget build(BuildContext context) {
return Container(
constraints: const BoxConstraints(minHeight: 66),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 11),
decoration: BoxDecoration(
color: const Color(0xFFF7F8FA),
borderRadius: AppRadius.smBorder,
),
child: Row(
children: [
if (stat.icon != null) ...[
Icon(stat.icon, color: color, size: 19),
const SizedBox(width: 8),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
stat.value,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: AppColors.textPrimary,
fontSize: 17,
fontWeight: FontWeight.w700,
),
),
const SizedBox(height: 2),
Text(
stat.label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: AppColors.textSecondary,
fontSize: 12,
fontWeight: FontWeight.w600,
),
),
],
),
),
],
),
);
}
}