From 9d5a53ea1f266881768269e1cbc654c053215edf Mon Sep 17 00:00:00 2001 From: lxh2875931338 Date: Sat, 4 Jul 2026 12:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E5=9B=BE=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/battery_health_page.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/pages/battery_health_page.dart b/lib/pages/battery_health_page.dart index aba3007..72aa9ed 100644 --- a/lib/pages/battery_health_page.dart +++ b/lib/pages/battery_health_page.dart @@ -1037,12 +1037,13 @@ class _BatteryHealthPageState extends State double value = percents[index]; Color barColor; if (value > 0) { - if (value >= 80) + if (value >= 80) { barColor = kHealthGreen; - else if (value >= 60) + } else if (value >= 70) { barColor = kHealthYellow; - else - barColor = kHealthOrange; + } else { + barColor = Colors.red; // 🟢 小于 70 显示红色 + } } else { barColor = Colors.grey.shade300; }