fix: 修复路由映射和入口连接
- profile 路由从 ProfileDetailPage 改为 ProfilePage - profileEdit 路由改为 ProfileDetailPage - 新增 devices 路由(DeviceManagementPage) - 设置页隐私协议/关于按钮接线 staticText - 设置页用药提醒跳转 medications - 个人中心健康档案修正为 healthArchive,新增设备管理入口
This commit is contained in:
@@ -10,6 +10,7 @@ import '../pages/report/ai_analysis_page.dart';
|
|||||||
import '../pages/consultation/consultation_pages.dart';
|
import '../pages/consultation/consultation_pages.dart';
|
||||||
import '../pages/settings/settings_pages.dart';
|
import '../pages/settings/settings_pages.dart';
|
||||||
import '../pages/settings/notification_prefs_page.dart';
|
import '../pages/settings/notification_prefs_page.dart';
|
||||||
|
import '../pages/profile/profile_page.dart';
|
||||||
import '../pages/profile/profile_detail_page.dart';
|
import '../pages/profile/profile_detail_page.dart';
|
||||||
import '../pages/diet/diet_capture_page.dart';
|
import '../pages/diet/diet_capture_page.dart';
|
||||||
import '../pages/remaining_pages.dart';
|
import '../pages/remaining_pages.dart';
|
||||||
@@ -49,9 +50,11 @@ Widget buildPage(RouteInfo route) {
|
|||||||
case 'dietCapture':
|
case 'dietCapture':
|
||||||
return const DietCapturePage();
|
return const DietCapturePage();
|
||||||
case 'profile':
|
case 'profile':
|
||||||
return const ProfileDetailPage();
|
return const ProfilePage();
|
||||||
case 'profileEdit':
|
case 'profileEdit':
|
||||||
return const EditProfilePage();
|
return const ProfileDetailPage();
|
||||||
|
case 'devices':
|
||||||
|
return const DeviceManagementPage();
|
||||||
case 'healthArchive':
|
case 'healthArchive':
|
||||||
return const HealthArchivePage();
|
return const HealthArchivePage();
|
||||||
case 'followups':
|
case 'followups':
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ class ProfilePage extends ConsumerWidget {
|
|||||||
]),
|
]),
|
||||||
])),
|
])),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_MenuItem(icon: Icons.folder_shared, title: '健康档案', onTap: () => pushRoute(ref, 'profile')),
|
_MenuItem(icon: Icons.folder_shared, title: '健康档案', onTap: () => pushRoute(ref, 'healthArchive')),
|
||||||
|
_MenuItem(icon: Icons.devices, title: '设备管理', onTap: () => pushRoute(ref, 'devices')),
|
||||||
_MenuItem(icon: Icons.favorite_border, title: '就诊收藏', trailing: '3'),
|
_MenuItem(icon: Icons.favorite_border, title: '就诊收藏', trailing: '3'),
|
||||||
_MenuItem(icon: Icons.devices, title: '设备管理'),
|
_MenuItem(icon: Icons.devices, title: '设备管理'),
|
||||||
_MenuItem(icon: Icons.people_outline, title: '家人关怀'),
|
_MenuItem(icon: Icons.people_outline, title: '家人关怀'),
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ class SettingsPage extends ConsumerWidget {
|
|||||||
Container(width: double.infinity, padding: const EdgeInsets.all(24), decoration: const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24))), child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [Text('9:41', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.grey[800])), Row(children: [Icon(Icons.wifi, size: 18, color: Colors.grey[700]), const SizedBox(width: 4), Icon(Icons.battery_full, size: 18, color: Colors.grey[700])]),])),
|
Container(width: double.infinity, padding: const EdgeInsets.all(24), decoration: const BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(bottomLeft: Radius.circular(24), bottomRight: Radius.circular(24))), child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [Text('9:41', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.grey[800])), Row(children: [Icon(Icons.wifi, size: 18, color: Colors.grey[700]), const SizedBox(width: 4), Icon(Icons.battery_full, size: 18, color: Colors.grey[700])]),])),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_SetItem(icon: Icons.notifications_outlined, title: '消息通知', onTap: () => pushRoute(ref, 'notificationPrefs')),
|
_SetItem(icon: Icons.notifications_outlined, title: '消息通知', onTap: () => pushRoute(ref, 'notificationPrefs')),
|
||||||
_SetItem(icon: Icons.medication_outlined, title: '用药提醒', subtitle: 'mmHg / mmol/L'),
|
_SetItem(icon: Icons.medication_outlined, title: '用药提醒', subtitle: 'mmHg / mmol/L', onTap: () => pushRoute(ref, 'medications')),
|
||||||
_SetItem(icon: Icons.data_usage_outlined, title: '数据导出'),
|
_SetItem(icon: Icons.data_usage_outlined, title: '数据导出', onTap: () {}),
|
||||||
_SetItem(icon: Icons.text_fields_outlined, title: '字体大小', trailingText: 'v1.0.0'),
|
_SetItem(icon: Icons.text_fields_outlined, title: '字体大小', trailingText: 'v1.0.0', onTap: () {}),
|
||||||
_SetItem(icon: Icons.cleaning_services_outlined, title: '清除缓存', subtitle: '73.2 MB'),
|
_SetItem(icon: Icons.cleaning_services_outlined, title: '清除缓存', subtitle: '73.2 MB', onTap: () {}),
|
||||||
_SetItem(icon: Icons.info_outline, title: '关于健康管家'),
|
_SetItem(icon: Icons.info_outline, title: '关于健康管家', onTap: () => pushRoute(ref, 'staticText', params: {'type': 'about'})),
|
||||||
_SetItem(icon: Icons.shield_outlined, title: '隐私协议'),
|
_SetItem(icon: Icons.shield_outlined, title: '隐私协议', onTap: () => pushRoute(ref, 'staticText', params: {'type': 'privacy'})),
|
||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
|||||||
Reference in New Issue
Block a user