Compare commits
9 Commits
4652034373
...
1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 17c728565c | |||
| 64e1a9f910 | |||
| 9d5a53ea1f | |||
| 49d4127ad9 | |||
| b97508dd10 | |||
| ff1070a350 | |||
| 22db1bc89b | |||
| c445ced7c1 | |||
| a745a02b2a |
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"cmake.ignoreCMakeListsMissing": true
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
> 专机专配 · 仅针对魅族独家开发
|
> 专机专配 · 仅针对魅族独家开发
|
||||||
|
|
||||||
一个简洁的手机电池健康度监测工具
|
一个简洁的手机电池健康度监测工具<br>
|
||||||
通过读取 BMS 日志(`/storage/emulated/0/mbattery_charger/`)直接获取电池真实数据
|
通过读取 BMS 日志(`/storage/emulated/0/mbattery_charger/`)直接获取电池真实数据<br>
|
||||||
不依赖系统 API 估算。
|
不依赖系统 API 估算。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ class ChargeMaps {
|
|||||||
6: 30,
|
6: 30,
|
||||||
7: 45,
|
7: 45,
|
||||||
8: 65,
|
8: 65,
|
||||||
9: 80,
|
10: 80,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -795,10 +795,13 @@ class _BatteryHealthPageState extends State<BatteryHealthPage>
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
healthPercent.toStringAsFixed(1),
|
healthPercent.toStringAsFixed(1),
|
||||||
style: const TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 40,
|
fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
|
color: healthPercent < 70
|
||||||
|
? Colors.red
|
||||||
|
: Colors.black, // 🟢 动态颜色
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
@@ -808,7 +811,9 @@ class _BatteryHealthPageState extends State<BatteryHealthPage>
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
color: Colors.grey.shade600,
|
color: healthPercent < 70
|
||||||
|
? Colors.red
|
||||||
|
: Colors.grey.shade600, // 🟢 动态颜色
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -1037,12 +1042,13 @@ class _BatteryHealthPageState extends State<BatteryHealthPage>
|
|||||||
double value = percents[index];
|
double value = percents[index];
|
||||||
Color barColor;
|
Color barColor;
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
if (value >= 80)
|
if (value >= 80) {
|
||||||
barColor = kHealthGreen;
|
barColor = kHealthGreen;
|
||||||
else if (value >= 60)
|
} else if (value >= 70) {
|
||||||
barColor = kHealthYellow;
|
barColor = kHealthYellow;
|
||||||
else
|
} else {
|
||||||
barColor = kHealthOrange;
|
barColor = Colors.red; // 🟢 小于 70 显示红色
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
barColor = Colors.grey.shade300;
|
barColor = Colors.grey.shade300;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.2.0-dev.3
|
version: 1.3.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.2
|
sdk: ^3.9.2
|
||||||
|
|||||||
Reference in New Issue
Block a user