fix: 欢迎卡片UI优化 + 蓝牙录入按钮 + 多处修复

- 欢迎卡片:去掉白框圆角错位、图片满宽、按钮去箭头改圆角居中
- 渐变actionOutlineGradient改紫蓝双色循环
- 新增健康Agent"蓝牙录入"按钮→蓝牙设备页
- "查看健康情况"改名"健康概览"
- 饮食编辑框删除bug修复(控制器缓存)
- 启动脚本加adb reverse自动转发
- 登录闪屏修复
This commit is contained in:
MingNian
2026-06-17 10:58:59 +08:00
parent 9279b7e283
commit 4f1ad82345
28 changed files with 1641 additions and 1098 deletions

View File

@@ -5,6 +5,7 @@ import 'package:flutter_blue_plus/flutter_blue_plus.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:permission_handler/permission_handler.dart';
import '../../core/app_colors.dart';
import '../../core/app_theme.dart';
import '../../core/navigation_provider.dart';
import '../../providers/auth_provider.dart';
import '../../providers/omron_device_provider.dart';
@@ -183,10 +184,9 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
return GradientScaffold(
appBar: AppBar(
backgroundColor: Colors.white,
backgroundColor: Colors.white.withValues(alpha: 0.9),
elevation: 0,
title: Text(
_connected ? _deviceName : '添加设备',
@@ -256,7 +256,7 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
height: 80 * _pulseAnim.value,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: AppColors.primary.withValues(alpha: 0.08),
color: AppColors.auraIndigo.withValues(alpha: 0.10),
),
),
),
@@ -264,13 +264,14 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
width: 64,
height: 64,
decoration: BoxDecoration(
color: AppColors.avatarBg,
gradient: AppColors.calmHealthGradient,
borderRadius: BorderRadius.circular(20),
boxShadow: AppColors.buttonShadow,
),
child: const Icon(
Icons.bluetooth_searching,
size: 32,
color: AppColors.primary,
color: Colors.white,
),
),
],
@@ -301,19 +302,18 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
width: 100,
height: 100,
decoration: BoxDecoration(
color: _readingReceived
? AppColors.successLight
: AppColors.avatarBg,
gradient: _readingReceived
? AppColors.calmHealthGradient
: AppColors.primaryGradient,
borderRadius: BorderRadius.circular(32),
boxShadow: AppColors.buttonShadow,
),
child: Icon(
_readingReceived
? Icons.check_rounded
: Icons.bluetooth_connected,
size: 48,
color: _readingReceived
? const Color(0xFF10B981)
: AppColors.primary,
color: _readingReceived ? Colors.white : Colors.white,
),
),
const SizedBox(height: 24),
@@ -456,9 +456,9 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
margin: const EdgeInsets.only(bottom: 8),
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
color: Colors.white,
gradient: AppColors.surfaceGradient,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppColors.border),
border: Border.all(color: AppColors.borderLight),
boxShadow: AppColors.cardShadowLight,
),
child: Row(
@@ -467,14 +467,10 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
width: 44,
height: 44,
decoration: BoxDecoration(
color: AppColors.avatarBg,
gradient: AppColors.calmHealthGradient,
borderRadius: BorderRadius.circular(12),
),
child: const Icon(
Icons.bluetooth,
size: 22,
color: AppColors.primary,
),
child: const Icon(Icons.bluetooth, size: 22, color: Colors.white),
),
const SizedBox(width: 12),
Expanded(
@@ -515,8 +511,9 @@ class _DeviceScanPageState extends ConsumerState<DeviceScanPage>
vertical: 10,
),
decoration: BoxDecoration(
color: AppColors.primary,
gradient: AppColors.primaryGradient,
borderRadius: BorderRadius.circular(12),
boxShadow: AppColors.buttonShadow,
),
child: const Text(
'连接',