style: 全项目紫色→薄荷绿 Fresh Air 清新风
- 主色 #635BFF→#14B8A6 (薄荷绿) - 浅紫 #EDEBFF→#E6FAF6 (极浅薄荷) - 深紫 #4B44D6→#0F9D8E (深薄荷) - 渐变紫→薄荷渐变 - 全局13种紫色映射替换
This commit is contained in:
@@ -132,11 +132,11 @@ class DietCapturePage extends ConsumerWidget {
|
||||
width: 180,
|
||||
height: 180,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F3FF),
|
||||
color: const Color(0xFFF2FAF9),
|
||||
borderRadius: BorderRadius.circular(90),
|
||||
border: Border.all(color: const Color(0xFF635BFF), width: 2),
|
||||
border: Border.all(color: const Color(0xFF14B8A6), width: 2),
|
||||
),
|
||||
child: const Icon(Icons.camera_alt, size: 48, color: Color(0xFF635BFF)),
|
||||
child: const Icon(Icons.camera_alt, size: 48, color: Color(0xFF14B8A6)),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const Text('拍摄或上传您的餐食照片', style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500)),
|
||||
@@ -165,10 +165,10 @@ class DietCapturePage extends ConsumerWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFEFEFF),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
boxShadow: [BoxShadow(color: const Color(0xFF635BFF).withAlpha(20), blurRadius: 8, offset: const Offset(0, 2))],
|
||||
boxShadow: [BoxShadow(color: const Color(0xFF14B8A6).withAlpha(20), blurRadius: 8, offset: const Offset(0, 2))],
|
||||
),
|
||||
child: IconButton(
|
||||
icon: Icon(icon, size: 32, color: const Color(0xFF635BFF)),
|
||||
icon: Icon(icon, size: 32, color: const Color(0xFF14B8A6)),
|
||||
onPressed: () => _pickImage(context, ref, source),
|
||||
),
|
||||
),
|
||||
@@ -244,11 +244,11 @@ class DietCapturePage extends ConsumerWidget {
|
||||
child: Column(children: [
|
||||
Text(meal['icon']!, style: const TextStyle(fontSize: 20)),
|
||||
const SizedBox(height: 4),
|
||||
Text(meal['label']!, style: TextStyle(fontSize: 12, color: isSelected ? Colors.white : const Color(0xFF635BFF))),
|
||||
Text(meal['label']!, style: TextStyle(fontSize: 12, color: isSelected ? Colors.white : const Color(0xFF14B8A6))),
|
||||
]),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: isSelected ? const Color(0xFF635BFF) : const Color(0xFFF5F3FF),
|
||||
foregroundColor: isSelected ? Colors.white : const Color(0xFF635BFF),
|
||||
backgroundColor: isSelected ? const Color(0xFF14B8A6) : const Color(0xFFF2FAF9),
|
||||
foregroundColor: isSelected ? Colors.white : const Color(0xFF14B8A6),
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
@@ -268,10 +268,10 @@ class DietCapturePage extends ConsumerWidget {
|
||||
height: 60,
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEDEBFF),
|
||||
color: const Color(0xFFE6FAF6),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: const CircularProgressIndicator(strokeWidth: 3, color: Color(0xFF635BFF)),
|
||||
child: const CircularProgressIndicator(strokeWidth: 3, color: Color(0xFF14B8A6)),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const Text('AI 正在识别食物...', style: TextStyle(fontSize: 16, color: Color(0xFF666666))),
|
||||
@@ -286,7 +286,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFEFEFF),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: const Color(0xFFE8E6FF), width: 1.5),
|
||||
border: Border.all(color: const Color(0xFFD4EDE8), width: 1.5),
|
||||
),
|
||||
child: Column(children: [
|
||||
Padding(
|
||||
@@ -297,7 +297,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
const Text('识别结果', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add, size: 20, color: Color(0xFF635BFF)),
|
||||
icon: const Icon(Icons.add, size: 20, color: Color(0xFF14B8A6)),
|
||||
onPressed: () => ref.read(dietProvider.notifier).addFood(),
|
||||
),
|
||||
]),
|
||||
@@ -312,14 +312,14 @@ class DietCapturePage extends ConsumerWidget {
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: food.selected ? const Color(0xFFF5F3FF) : const Color(0xFFF5F5F5),
|
||||
color: food.selected ? const Color(0xFFF2FAF9) : const Color(0xFFF5F5F5),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(children: [
|
||||
Checkbox(
|
||||
value: food.selected,
|
||||
onChanged: (v) => ref.read(dietProvider.notifier).toggleFood(food.id),
|
||||
activeColor: const Color(0xFF635BFF),
|
||||
activeColor: const Color(0xFF14B8A6),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
@@ -339,7 +339,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
controller: TextEditingController(text: food.calories.toString()),
|
||||
keyboardType: TextInputType.number,
|
||||
onChanged: (v) => ref.read(dietProvider.notifier).updateFoodCalories(food.id, int.tryParse(v) ?? 0),
|
||||
style: TextStyle(fontSize: 12, color: const Color(0xFF635BFF)),
|
||||
style: TextStyle(fontSize: 12, color: const Color(0xFF14B8A6)),
|
||||
),
|
||||
),
|
||||
const Text('kcal', style: TextStyle(fontSize: 12, color: Color(0xFF999999))),
|
||||
@@ -358,7 +358,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF5F3FF),
|
||||
color: const Color(0xFFF2FAF9),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(children: [
|
||||
@@ -383,7 +383,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFEFEFF),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: const Color(0xFFE8E6FF), width: 1.5),
|
||||
border: Border.all(color: const Color(0xFFD4EDE8), width: 1.5),
|
||||
),
|
||||
child: Column(children: [
|
||||
const Text('🥗 健康评分', style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600)),
|
||||
@@ -417,7 +417,7 @@ class DietCapturePage extends ConsumerWidget {
|
||||
switch (score) {
|
||||
case 1: return const Color(0xFFE53935);
|
||||
case 2: return const Color(0xFFF9A825);
|
||||
case 3: return const Color(0xFF635BFF);
|
||||
case 3: return const Color(0xFF14B8A6);
|
||||
case 4: return const Color(0xFF43A047);
|
||||
case 5: return const Color(0xFF00C853);
|
||||
default: return Colors.grey[400]!;
|
||||
@@ -431,13 +431,13 @@ class DietCapturePage extends ConsumerWidget {
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text('饮食记录已保存 ✅'),
|
||||
backgroundColor: Color(0xFF635BFF),
|
||||
backgroundColor: Color(0xFF14B8A6),
|
||||
));
|
||||
popRoute(ref);
|
||||
},
|
||||
child: const Text('保存记录'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF635BFF),
|
||||
backgroundColor: const Color(0xFF14B8A6),
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
|
||||
Reference in New Issue
Block a user