feat: 三端抽屉重构 + 配色系统更新 + 后台管理页精调 + 键盘抬起组件

## 抽屉重构
- admin_drawer / doctor_drawer / health_drawer 三端抽屉全部重做
- drawer_shell 增强

## 配色系统
- app_colors / app_module_visuals / app_theme 更新
- app.dart 启动流程调整

## 后台管理页
- admin_doctors_page 大幅重构(+251)
- admin_home / doctor_dashboard / doctor_reports / doctor_home / doctor_followups / doctor_settings 精调

## 患者端
- home_page / chat_messages_view / medication_list / notification_center / remaining_pages / exercise_plan / device / diet / consultation 微调

## 新增
- keyboard_lift.dart: 键盘抬起处理组件
- AGENTS.md: agent 指引文档

## 其他
- api_client IP 适配
- app_future_view 增强
- data_providers 调整
- secondary_page_visuals_test 更新
This commit is contained in:
MingNian
2026-07-19 19:11:30 +08:00
parent ae94ced2d5
commit 0d4fd88ce7
35 changed files with 1022 additions and 644 deletions

View File

@@ -1287,11 +1287,20 @@ class ChatMessagesView extends ConsumerWidget {
border: visual.borderColor,
iconBg: visual.lightColor,
accent: visual.color,
iconColor: Colors.white,
verticalGradient: true,
);
return switch (agent) {
ActiveAgent.health => fromModule(AppModuleVisuals.health),
ActiveAgent.health => _AgentColors(
gradient: AppModuleVisuals.health.gradient.colors,
bg: AppModuleVisuals.health.lightColor,
border: AppModuleVisuals.health.borderColor,
iconBg: AppModuleVisuals.health.lightColor,
accent: AppModuleVisuals.health.color,
iconColor: Colors.white,
verticalGradient: true,
),
ActiveAgent.diet => fromModule(AppModuleVisuals.diet),
ActiveAgent.medication => fromModule(AppModuleVisuals.medication),
ActiveAgent.report => fromModule(AppModuleVisuals.report),
@@ -1302,6 +1311,7 @@ class ChatMessagesView extends ConsumerWidget {
border: const Color(0xFFFFDFE7),
iconBg: const Color(0xFFFFEEF2),
accent: const Color(0xFFFF7F98),
iconColor: Colors.white,
verticalGradient: true,
),
_ => _AgentColors(
@@ -1310,6 +1320,7 @@ class ChatMessagesView extends ConsumerWidget {
border: const Color(0xFFE7E0FF),
iconBg: const Color(0xFFF0EDFF),
accent: AppColors.primary,
iconColor: Colors.white,
),
};
}
@@ -1317,7 +1328,7 @@ class ChatMessagesView extends ConsumerWidget {
static (_AgentIcon, String, String) _agentInfo(ActiveAgent agent) {
return switch (agent) {
ActiveAgent.health => (LucideIcons.heartPulse, '记数据', '录入血压、血糖、心率等日常指标'),
ActiveAgent.diet => (LucideIcons.utensils, '拍饮食', '拍照识别食物热量和营养成分'),
ActiveAgent.diet => (AppModuleVisuals.diet.icon, '拍饮食', '拍照识别食物热量和营养成分'),
ActiveAgent.medication => (LucideIcons.pill, '药管家', '管理药品、提醒服药、追踪用量'),
ActiveAgent.consultation => (
LucideIcons.messageCircle,
@@ -1967,7 +1978,7 @@ class _AgentMark extends StatelessWidget {
),
],
),
child: Center(child: Icon(icon, size: 32, color: Colors.white)),
child: Center(child: Icon(icon, size: 32, color: colors.iconColor)),
);
}
}
@@ -2027,6 +2038,7 @@ class _AgentColors {
final Color border;
final Color iconBg;
final Color accent;
final Color iconColor;
final bool verticalGradient;
const _AgentColors({
required this.gradient,
@@ -2034,6 +2046,7 @@ class _AgentColors {
required this.border,
required this.iconBg,
required this.accent,
required this.iconColor,
this.verticalGradient = false,
});
}