Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 46f8dbc67e |
Vendored
+1
-2
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"cmake.ignoreCMakeListsMissing": true,
|
"cmake.ignoreCMakeListsMissing": true
|
||||||
"gitlens.codeLens.enabled": false
|
|
||||||
}
|
}
|
||||||
@@ -24,26 +24,18 @@
|
|||||||
|
|
||||||
| 版本 | 主题 | 状态 |
|
| 版本 | 主题 | 状态 |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
| 1.5.0 | 功率计算优化 | ✅ 已发布 |
|
| 1.4.0 | SAF 权限改造 | ✅ 已发布 |
|
||||||
| 1.5.2 | 部分场景字体替换 | ✅ 已发布 |
|
| 1.4.5 | 魅族20系补充适配调整 | ✅ 已发布 |
|
||||||
| 1.6.0 | 更新日志独立页面 | 📋近期开发 |
|
| 1.5.0 | 功率计算优化 | 📋 规划中 |
|
||||||
| 1.7.0 | 适配夜间模式 | 📋近期开发 |
|
| 2.0.0 | 数据看板扩展(月/季/年趋势) | 📋 远景 |
|
||||||
| 2.0.0 | 数据看板扩展等系列更新 | 📋 远景 |
|
|
||||||
| 3.0.0 | 搭配PC上位机记录充电信息等 | 📋 远景 |
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
- Flutter SDK: ^3.9.2
|
- Flutter SDK: ^3.9.2
|
||||||
- Android: 8.0+ (API 26+)
|
- Android: 8.0+ (API 26+)
|
||||||
|
- 仅支持魅族手机(15 系列 ~ 22 系列)
|
||||||
---
|
|
||||||
|
|
||||||
## 机型匹配情况
|
|
||||||
目前据群友反馈已知:
|
|
||||||
- 魅族22无mbattery_charger目录生成,无法实时计算相应百分比,因此已在最近版本去除相关匹配信息
|
|
||||||
- 魅族18在后续的版本中关闭了mbattery_log生成,疑似无效,老版本可能支持
|
|
||||||
- 最完美的支持版本至少可覆盖魅族20/21系机型(20inf已确认,机型匹配ID已更新)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -57,5 +49,4 @@ flutter pub get
|
|||||||
flutter run
|
flutter run
|
||||||
|
|
||||||
# Release APK
|
# Release APK
|
||||||
flutter build apk --release --target-platform android-arm64
|
flutter build apk --release
|
||||||
```
|
|
||||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
description: This file stores settings for Dart & Flutter DevTools.
|
|
||||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
|
||||||
extensions:
|
|
||||||
@@ -1,36 +1,31 @@
|
|||||||
/// 容量提取工具
|
/// 容量提取工具
|
||||||
/// 支持两种日志格式:
|
/// 支持两种日志格式:
|
||||||
/// 1. learned_cap(21 系列):单位 µAh,除以 1000 得到 mAh
|
/// 1. learned_cap(21 系列):单位 µAh,除以 1000 得到 mAh
|
||||||
/// 🟢 优先级最高,不受 status 限制(BMS 可能在任意状态行更新此值)
|
/// 2. remaining_cap(20 系列):单位 mAh,直接使用(但 21 系列的 remaining_cap 也是 µAh,需判断)
|
||||||
/// 2. remaining_cap(20 系列):仅从 status=Full 行提取,单位智能识别(µAh/mAh)
|
///
|
||||||
|
/// 🟢 1.4.5 优化:仅从 status=Full 的行中提取容量(充满状态下 BMS 最准确)
|
||||||
class CapacityExtractor {
|
class CapacityExtractor {
|
||||||
static int? extractCapacity(List<String> lines) {
|
static int? extractCapacity(List<String> lines) {
|
||||||
final validLines = lines.where((line) => line.contains('tbat=')).toList();
|
// 🟢 只保留包含 tbat= 且 status=Full 的行
|
||||||
if (validLines.isEmpty) return null;
|
final fullLines = lines.where((line) {
|
||||||
|
return line.contains('tbat=') && line.contains('status=Full');
|
||||||
|
}).toList();
|
||||||
|
|
||||||
// ============================================================
|
if (fullLines.isEmpty) {
|
||||||
// 🟢 第一优先级:learned_cap(21 系列专属)
|
// 今天没有充满电的记录,返回 null 表示无有效数据
|
||||||
// 不限制 status,在所有有效行中搜索,取最新的一条
|
return null;
|
||||||
// ============================================================
|
}
|
||||||
|
|
||||||
|
// 模式一:learned_cap(21 系列)
|
||||||
final learnedReg = RegExp(r'learned_cap=(\d+)');
|
final learnedReg = RegExp(r'learned_cap=(\d+)');
|
||||||
for (String line in validLines.reversed) {
|
for (String line in fullLines.reversed) {
|
||||||
final match = learnedReg.firstMatch(line);
|
final match = learnedReg.firstMatch(line);
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
final value = int.parse(match.group(1)!);
|
return int.parse(match.group(1)!) ~/ 1000;
|
||||||
// learned_cap 单位固定为 µAh,直接除以 1000 转 mAh
|
|
||||||
return value ~/ 1000;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
// 模式二:remaining_cap 最大值(20 系列,或 21 系列回退)
|
||||||
// 🟢 第二优先级:remaining_cap(20 系列回退方案)
|
|
||||||
// 仅从 status=Full 行提取(充满状态下 BMS 最准确)
|
|
||||||
// ============================================================
|
|
||||||
final fullLines = validLines
|
|
||||||
.where((line) => line.contains('status=Full'))
|
|
||||||
.toList();
|
|
||||||
if (fullLines.isEmpty) return null;
|
|
||||||
|
|
||||||
final remainingReg = RegExp(r'remaining_cap=(\d+)');
|
final remainingReg = RegExp(r'remaining_cap=(\d+)');
|
||||||
int? maxRemaining;
|
int? maxRemaining;
|
||||||
for (String line in fullLines) {
|
for (String line in fullLines) {
|
||||||
@@ -44,7 +39,7 @@ class CapacityExtractor {
|
|||||||
}
|
}
|
||||||
if (maxRemaining == null) return null;
|
if (maxRemaining == null) return null;
|
||||||
|
|
||||||
// 🟢 智能单位识别:如果数值大于 100000(约 100 mAh),视为 µAh 需除以 1000
|
// 🟢 判断单位:如果数值大于 100000(约 100 mAh),则认为是 µAh,需除以 1000
|
||||||
if (maxRemaining > 100000) {
|
if (maxRemaining > 100000) {
|
||||||
return maxRemaining ~/ 1000;
|
return maxRemaining ~/ 1000;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -38,9 +38,8 @@ class ChargeParser {
|
|||||||
final result = <Map<String, dynamic>>[];
|
final result = <Map<String, dynamic>>[];
|
||||||
for (String line in lines) {
|
for (String line in lines) {
|
||||||
final timestamp = TimeUtils.parseLogTimestamp(line);
|
final timestamp = TimeUtils.parseLogTimestamp(line);
|
||||||
if (!TimeUtils.isLogTimestampValid(timestamp, chargingStartTime)) {
|
if (!TimeUtils.isLogTimestampValid(timestamp, chargingStartTime))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
final isUsb =
|
final isUsb =
|
||||||
line.contains('chg_usb') &&
|
line.contains('chg_usb') &&
|
||||||
@@ -102,7 +101,7 @@ class ChargeParser {
|
|||||||
return ParseResult(
|
return ParseResult(
|
||||||
isWireless: false,
|
isWireless: false,
|
||||||
chargeType: chargeType,
|
chargeType: chargeType,
|
||||||
power: (vbus * ibus) / 1000000000000.0,
|
power: (vbus * ibus) / 1000000000.0,
|
||||||
volt: vbus / 1000000.0,
|
volt: vbus / 1000000.0,
|
||||||
curr: ibus / 1000000.0,
|
curr: ibus / 1000000.0,
|
||||||
wiredLevel: chargeType == 'PPS' ? level : null,
|
wiredLevel: chargeType == 'PPS' ? level : null,
|
||||||
|
|||||||
+2
-37
@@ -5,6 +5,7 @@ import 'services/saf_storage_service.dart';
|
|||||||
void main() async {
|
void main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
|
// 🟢 初始化 SAF 服务
|
||||||
await SafStorageService().init();
|
await SafStorageService().init();
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
@@ -18,45 +19,9 @@ class MyApp extends StatelessWidget {
|
|||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: '电池健康度',
|
title: '电池健康度',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
// 🟢 中文用 HarmonyOS Sans SC
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
fontFamily: 'HarmonyOS_Sans_SC',
|
||||||
// 🟢 数字回退到 FlymeFont
|
|
||||||
fontFamilyFallback: const ['Flyme'],
|
|
||||||
// 🟢 统一文字颜色为黑色
|
|
||||||
colorScheme: ColorScheme.fromSeed(
|
colorScheme: ColorScheme.fromSeed(
|
||||||
seedColor: const Color(0xFFFFFFFF),
|
seedColor: const Color.fromARGB(255, 255, 255, 255),
|
||||||
).copyWith(onSurface: Colors.black),
|
|
||||||
textTheme: const TextTheme(
|
|
||||||
// 大标题/数字(健康度、容量等)
|
|
||||||
displayMedium: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontFamilyFallback: ['Flyme'],
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
// 标题(如“容量百分比变动趋势”)
|
|
||||||
headlineMedium: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontFamilyFallback: ['Flyme'],
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
// 正文(电压、温度、循环次数等)
|
|
||||||
bodyMedium: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontFamilyFallback: ['Flyme'],
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
// 小字(日期、辅助信息)
|
|
||||||
bodySmall: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontFamilyFallback: ['Flyme'],
|
|
||||||
color: Colors.black87,
|
|
||||||
),
|
|
||||||
// 数字专用(大号数字,如健康度百分比)
|
|
||||||
displayLarge: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontFamilyFallback: ['Flyme'],
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
useMaterial3: true,
|
useMaterial3: true,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
class DeviceMatching {
|
class DeviceMatching {
|
||||||
/// 根据机型返回设计容量(mAh)
|
/// 根据机型返回设计容量(mAh)
|
||||||
static int getDesignCapacity(String model) {
|
static int getDesignCapacity(String model) {
|
||||||
|
if (model.contains('22')) return 5510;
|
||||||
if (model.contains('21 Pro')) return 5050;
|
if (model.contains('21 Pro')) return 5050;
|
||||||
if (model.contains('21')) return 4800;
|
if (model.contains('21')) return 4800;
|
||||||
if (model.contains('20 Pro')) return 5000;
|
if (model.contains('20 Pro')) return 5000;
|
||||||
if (model.contains('20 Inf')) return 4800;
|
if (model.contains('20 INFINITY')) return 4800;
|
||||||
if (model.contains('20')) return 4700;
|
if (model.contains('20')) return 4700;
|
||||||
if (model.contains('18s Pro')) return 4500;
|
if (model.contains('18s Pro')) return 4500;
|
||||||
if (model.contains('18s')) return 4000;
|
if (model.contains('18s')) return 4000;
|
||||||
@@ -28,10 +29,11 @@ class DeviceMatching {
|
|||||||
|
|
||||||
/// 根据机型返回显示名称
|
/// 根据机型返回显示名称
|
||||||
static String getModelName(String model) {
|
static String getModelName(String model) {
|
||||||
|
if (model.contains('22')) return '魅族22';
|
||||||
if (model.contains('21 Pro')) return '魅族21 Pro';
|
if (model.contains('21 Pro')) return '魅族21 Pro';
|
||||||
if (model.contains('21')) return '魅族21';
|
if (model.contains('21')) return '魅族21';
|
||||||
if (model.contains('20 Pro')) return '魅族20 Pro';
|
if (model.contains('20 Pro')) return '魅族20 Pro';
|
||||||
if (model.contains('20 Inf')) return '魅族20 Infinity';
|
if (model.contains('20 INFINITY')) return '魅族20 INFINITY';
|
||||||
if (model.contains('20')) return '魅族20';
|
if (model.contains('20')) return '魅族20';
|
||||||
if (model.contains('18s Pro')) return '魅族18s Pro';
|
if (model.contains('18s Pro')) return '魅族18s Pro';
|
||||||
if (model.contains('18s')) return '魅族18s';
|
if (model.contains('18s')) return '魅族18s';
|
||||||
|
|||||||
@@ -613,8 +613,7 @@ class _BatteryHealthPageState extends State<BatteryHealthPage>
|
|||||||
if (_isWireless) {
|
if (_isWireless) {
|
||||||
return ChargeUtils.getDisplayPowerWireless(_chargePower);
|
return ChargeUtils.getDisplayPowerWireless(_chargePower);
|
||||||
} else {
|
} else {
|
||||||
// 🟢 1.5.0 改用新格式:实际/标定
|
return ChargeUtils.getDisplayPowerWired(
|
||||||
return ChargeUtils.getMainDisplayPowerWired(
|
|
||||||
_chargePower,
|
_chargePower,
|
||||||
_wiredLevel,
|
_wiredLevel,
|
||||||
_chargeType,
|
_chargeType,
|
||||||
@@ -631,8 +630,7 @@ class _BatteryHealthPageState extends State<BatteryHealthPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||||
value: const SystemUiOverlayStyle(
|
value: const SystemUiOverlayStyle(
|
||||||
// 🟢 1.5.0 统一状态栏颜色
|
statusBarColor: Colors.white,
|
||||||
statusBarColor: Color.fromRGBO(157, 212, 237, 0.1),
|
|
||||||
statusBarIconBrightness: Brightness.dark,
|
statusBarIconBrightness: Brightness.dark,
|
||||||
statusBarBrightness: Brightness.dark,
|
statusBarBrightness: Brightness.dark,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import '../constants/charge_maps.dart';
|
import '../constants/charge_maps.dart';
|
||||||
|
|
||||||
class ChargeUtils {
|
class ChargeUtils {
|
||||||
// ============ 无线充电(保持不变) ============
|
|
||||||
static String getDisplayPowerWireless(double power) {
|
static String getDisplayPowerWireless(double power) {
|
||||||
if (power == 0) return '读取中...';
|
if (power == 0) return '读取中...';
|
||||||
const List<int> levels = [5, 7, 15, 27, 40, 50, 66];
|
const List<int> levels = [5, 7, 15, 27, 40, 50, 66];
|
||||||
@@ -13,17 +12,21 @@ class ChargeUtils {
|
|||||||
return '≈${matchedLevel}W';
|
return '≈${matchedLevel}W';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============ 原有有线逻辑(保留兼容,但主界面不再直接调用) ============
|
|
||||||
static String getDisplayPowerWired(
|
static String getDisplayPowerWired(
|
||||||
double power,
|
double power,
|
||||||
int? wiredLevel,
|
int? wiredLevel,
|
||||||
String chargeType,
|
String chargeType,
|
||||||
) {
|
) {
|
||||||
|
// USB 慢充锁定 7.5W
|
||||||
if (chargeType == "SDP") return "≈7.5W";
|
if (chargeType == "SDP") return "≈7.5W";
|
||||||
|
|
||||||
|
// 🟢 优先使用 wiredLevel 精确匹配
|
||||||
if (wiredLevel != null && ChargeMaps.wiredPower.containsKey(wiredLevel)) {
|
if (wiredLevel != null && ChargeMaps.wiredPower.containsKey(wiredLevel)) {
|
||||||
double p = ChargeMaps.wiredPower[wiredLevel]!;
|
double p = ChargeMaps.wiredPower[wiredLevel]!;
|
||||||
if (p > 0) return '≈${p.toInt()}W';
|
if (p > 0) return '≈${p.toInt()}W';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 🟢 匹配阈值收窄到 ±3W,减少跳变
|
||||||
double best = 0;
|
double best = 0;
|
||||||
for (var entry in ChargeMaps.wiredPower.entries) {
|
for (var entry in ChargeMaps.wiredPower.entries) {
|
||||||
if (entry.value <= power + 3 && entry.value > best) {
|
if (entry.value <= power + 3 && entry.value > best) {
|
||||||
@@ -34,61 +37,11 @@ class ChargeUtils {
|
|||||||
return best > 0 ? '≈${best.toInt()}W' : '≈${power.round()}W';
|
return best > 0 ? '≈${best.toInt()}W' : '≈${power.round()}W';
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============ 🟢 1.5.0 新增:主界面显示(实际/标定) ============
|
|
||||||
/// 示例:≈30w/65w
|
|
||||||
static String getMainDisplayPowerWired(
|
|
||||||
double power,
|
|
||||||
int? wiredLevel,
|
|
||||||
String chargeType,
|
|
||||||
) {
|
|
||||||
// USB 慢充锁定 7.5W
|
|
||||||
if (chargeType == "SDP") return "≈7.5w";
|
|
||||||
|
|
||||||
if (power == 0) return "读取中...";
|
|
||||||
|
|
||||||
final actual = power.round();
|
|
||||||
|
|
||||||
// 有档位且能查到标定值
|
|
||||||
if (wiredLevel != null && ChargeMaps.wiredPower.containsKey(wiredLevel)) {
|
|
||||||
final requested = ChargeMaps.wiredPower[wiredLevel]!.round();
|
|
||||||
return "≈${actual}w/${requested}w";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 无档位信息,仅显示实际功率
|
|
||||||
return "≈${actual}w";
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============ 🟢 1.5.0 新增:二级页面标定档位显示 ============
|
|
||||||
/// 示例:≈80w/L-10
|
|
||||||
static String getDetailRequestedPowerWired(
|
|
||||||
double power,
|
|
||||||
int? wiredLevel,
|
|
||||||
String chargeType,
|
|
||||||
) {
|
|
||||||
if (chargeType == "SDP") return "≈7.5w";
|
|
||||||
|
|
||||||
if (power == 0) return "读取中...";
|
|
||||||
|
|
||||||
if (wiredLevel != null && ChargeMaps.wiredPower.containsKey(wiredLevel)) {
|
|
||||||
final requested = ChargeMaps.wiredPower[wiredLevel]!.round();
|
|
||||||
return "≈${requested}w/L-$wiredLevel";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "≈${power.round()}w";
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============ 🟢 1.5.0 新增:二级页面实际功率显示 ============
|
|
||||||
static String getDetailActualPowerWired(double power, String chargeType) {
|
|
||||||
if (chargeType == "SDP") return "≈7.5w";
|
|
||||||
if (power == 0) return "读取中...";
|
|
||||||
return "≈${power.round()}w";
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============ 充电类型标签(保持不变) ============
|
|
||||||
static String getChargeTypeLabel(bool isWireless, String chargeType) {
|
static String getChargeTypeLabel(bool isWireless, String chargeType) {
|
||||||
if (isWireless) {
|
if (isWireless) {
|
||||||
return chargeType == "无线" ? "无线" : chargeType;
|
return chargeType == "无线" ? "无线" : chargeType;
|
||||||
}
|
}
|
||||||
|
// 🟢 空类型显示"识别中...",比"等待log信息"更友好
|
||||||
if (chargeType.isEmpty) {
|
if (chargeType.isEmpty) {
|
||||||
return "识别中...";
|
return "识别中...";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
|
|
||||||
|
/// 电池信息面板(电压 + 温度 + 极值)
|
||||||
class BatteryInfoPanel extends StatelessWidget {
|
class BatteryInfoPanel extends StatelessWidget {
|
||||||
final double batteryVolt;
|
final double batteryVolt;
|
||||||
final double batteryTemp;
|
final double batteryTemp;
|
||||||
@@ -36,45 +37,21 @@ class BatteryInfoPanel extends StatelessWidget {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
RichText(
|
Text(
|
||||||
text: TextSpan(
|
'↑ ${maxVolt.toStringAsFixed(3)}V',
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Flyme',
|
color: Colors.red,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(
|
|
||||||
text: '↑ ',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(text: '${maxVolt.toStringAsFixed(3)}V'),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
RichText(
|
Text(
|
||||||
text: TextSpan(
|
'↓ ${minVolt.toStringAsFixed(3)}V',
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Flyme',
|
color: Colors.blue,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.blue,
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(
|
|
||||||
text: '↓ ',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
color: Colors.blue,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(text: '${minVolt.toStringAsFixed(3)}V'),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -89,50 +66,26 @@ class BatteryInfoPanel extends StatelessWidget {
|
|||||||
_buildInfoItem(
|
_buildInfoItem(
|
||||||
_buildIcon('temperature'),
|
_buildIcon('temperature'),
|
||||||
'温度',
|
'温度',
|
||||||
'${batteryTemp.toStringAsFixed(0)}℃',
|
'${batteryTemp.toStringAsFixed(0)}°C',
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
RichText(
|
Text(
|
||||||
text: TextSpan(
|
'↑ ${maxTemp.toStringAsFixed(0)}°C',
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Flyme',
|
color: Colors.red,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(
|
|
||||||
text: '↑ ',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
color: Colors.red,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(text: '${maxTemp.toStringAsFixed(0)}℃'),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
RichText(
|
Text(
|
||||||
text: TextSpan(
|
'↓ ${minTemp.toStringAsFixed(0)}°C',
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Flyme',
|
color: Colors.blue,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.blue,
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(
|
|
||||||
text: '↓ ',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
color: Colors.blue,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(text: '${minTemp.toStringAsFixed(0)}℃'),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -170,23 +123,11 @@ class BatteryInfoPanel extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
icon,
|
icon,
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Text(
|
Text(label, style: const TextStyle(fontSize: 14, color: Colors.grey)),
|
||||||
label,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Text(
|
Text(
|
||||||
value,
|
value,
|
||||||
style: const TextStyle(
|
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: Colors.black,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/// 电池健康度摘要组件(健康度 + cycles + mAh)
|
||||||
class BatterySummary extends StatelessWidget {
|
class BatterySummary extends StatelessWidget {
|
||||||
final double healthPercent;
|
final double healthPercent;
|
||||||
final int cycleCount;
|
final int cycleCount;
|
||||||
@@ -16,8 +17,6 @@ class BatterySummary extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final bool isLowHealth = healthPercent < 70;
|
|
||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
@@ -29,22 +28,20 @@ class BatterySummary extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
healthPercent.toStringAsFixed(1),
|
healthPercent.toStringAsFixed(1),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 40,
|
fontSize: 40,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
color: isLowHealth ? Colors.red : Colors.black,
|
color: healthPercent < 70 ? Colors.red : Colors.black,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
Text(
|
Text(
|
||||||
'%',
|
'%',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
color: isLowHealth ? Colors.red : Colors.grey.shade600,
|
color: healthPercent < 70 ? Colors.red : Colors.grey.shade600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -54,57 +51,46 @@ class BatterySummary extends StatelessWidget {
|
|||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
RichText(
|
Text(
|
||||||
text: TextSpan(
|
'$cycleCount cycles', // ✅ 修正:去掉下划线,使用 cycleCount
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'Flyme',
|
fontSize: 16,
|
||||||
fontSize: 16,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
height: 1.2,
|
||||||
height: 1.2,
|
),
|
||||||
color: Colors.black,
|
),
|
||||||
),
|
const SizedBox(height: 4),
|
||||||
|
Text.rich(
|
||||||
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
TextSpan(text: '$cycleCount'),
|
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' cycles',
|
text: currentCap.toStringAsFixed(0),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
fontSize: 20,
|
||||||
color: Colors.black,
|
fontWeight: FontWeight.w300,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: ' / ',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
color: Colors.grey.shade500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: '${designCap}mAh',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
style: const TextStyle(
|
||||||
const SizedBox(height: 4),
|
fontSize: 20,
|
||||||
RichText(
|
fontWeight: FontWeight.w300,
|
||||||
text: TextSpan(
|
height: 1.0,
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.w300,
|
|
||||||
height: 1.0,
|
|
||||||
color: const Color(0xFF5F5F5F),
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
TextSpan(text: currentCap.toStringAsFixed(0)),
|
|
||||||
TextSpan(
|
|
||||||
text: ' / ',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
color: const Color(0xFF5F5F5F).withValues(alpha: 0.5),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TextSpan(text: designCap.toString()),
|
|
||||||
TextSpan(
|
|
||||||
text: ' mAh',
|
|
||||||
style: const TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: Color(0xFF5F5F5F),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import '../utils/charge_utils.dart';
|
import '../utils/charge_utils.dart';
|
||||||
|
|
||||||
|
/// 充电详情页
|
||||||
class ChargeDetailPage extends StatelessWidget {
|
class ChargeDetailPage extends StatelessWidget {
|
||||||
final String chargeType;
|
final String chargeType;
|
||||||
final bool isWireless;
|
final bool isWireless;
|
||||||
@@ -20,6 +20,14 @@ class ChargeDetailPage extends StatelessWidget {
|
|||||||
this.wiredLevel,
|
this.wiredLevel,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
String _getDisplayPower() {
|
||||||
|
if (isWireless) {
|
||||||
|
return ChargeUtils.getDisplayPowerWireless(power);
|
||||||
|
} else {
|
||||||
|
return ChargeUtils.getDisplayPowerWired(power, wiredLevel, chargeType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String _getProtocolDisplay() {
|
String _getProtocolDisplay() {
|
||||||
if (isWireless) return '无线充电($chargeType)';
|
if (isWireless) return '无线充电($chargeType)';
|
||||||
if (chargeType == 'PPS') return 'PPS 快充';
|
if (chargeType == 'PPS') return 'PPS 快充';
|
||||||
@@ -27,84 +35,47 @@ class ChargeDetailPage extends StatelessWidget {
|
|||||||
return chargeType;
|
return chargeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
String _getRequestedDisplay() {
|
|
||||||
return ChargeUtils.getDetailRequestedPowerWired(
|
|
||||||
power,
|
|
||||||
wiredLevel,
|
|
||||||
chargeType,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String _getActualDisplay() {
|
|
||||||
return ChargeUtils.getDetailActualPowerWired(power, chargeType);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
return Scaffold(
|
||||||
value: const SystemUiOverlayStyle(
|
appBar: AppBar(
|
||||||
statusBarColor: Color.fromRGBO(157, 212, 237, 0.1),
|
title: const Text('充电详情'),
|
||||||
statusBarIconBrightness: Brightness.dark,
|
backgroundColor: const Color.fromARGB(0, 255, 255, 255),
|
||||||
statusBarBrightness: Brightness.dark,
|
elevation: 0,
|
||||||
|
foregroundColor: Colors.black,
|
||||||
|
iconTheme: const IconThemeData(color: Colors.black),
|
||||||
),
|
),
|
||||||
child: Scaffold(
|
body: Padding(
|
||||||
backgroundColor: Colors.white,
|
padding: const EdgeInsets.all(20.0),
|
||||||
appBar: AppBar(
|
child: Column(
|
||||||
title: const Text('充电详情'),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
backgroundColor: Colors.white,
|
children: [
|
||||||
elevation: 0,
|
_buildDetailRow('协议', _getProtocolDisplay()),
|
||||||
scrolledUnderElevation: 0,
|
const Divider(),
|
||||||
shadowColor: Colors.transparent,
|
_buildDetailRow('功率', _getDisplayPower()),
|
||||||
surfaceTintColor: Colors.transparent,
|
const Divider(),
|
||||||
foregroundColor: Colors.black,
|
_buildDetailRow('电压', '${volt.toStringAsFixed(2)}V'),
|
||||||
iconTheme: const IconThemeData(color: Colors.black),
|
const Divider(),
|
||||||
),
|
_buildDetailRow('电流', '${curr.toStringAsFixed(2)}A'),
|
||||||
body: Padding(
|
const Divider(),
|
||||||
padding: const EdgeInsets.all(20.0),
|
if (!isWireless && wiredLevel != null)
|
||||||
child: Column(
|
_buildDetailRow('档位', '$wiredLevel'),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
if (!isWireless && wiredLevel == null) _buildDetailRow('档位', '自动'),
|
||||||
children: [
|
if (isWireless) _buildDetailRow('类型', '无线'),
|
||||||
_buildTextRow('协议', _getProtocolDisplay()),
|
const Spacer(),
|
||||||
const Divider(),
|
Center(
|
||||||
|
child: Text(
|
||||||
if (!isWireless) ...[
|
'数据来自 BMS 实时日志',
|
||||||
_buildTextRow('标定档位', _getRequestedDisplay()),
|
style: TextStyle(fontSize: 12, color: Colors.grey.shade500),
|
||||||
const Divider(),
|
|
||||||
_buildTextRow('实际功率', _getActualDisplay()),
|
|
||||||
const Divider(),
|
|
||||||
] else ...[
|
|
||||||
_buildTextRow('功率', ChargeUtils.getDisplayPowerWireless(power)),
|
|
||||||
const Divider(),
|
|
||||||
],
|
|
||||||
|
|
||||||
_buildDetailRow('电压', volt, 'V'),
|
|
||||||
const Divider(),
|
|
||||||
_buildDetailRow('电流', curr, 'A'),
|
|
||||||
const Divider(),
|
|
||||||
|
|
||||||
if (isWireless) _buildTextRow('类型', '无线'),
|
|
||||||
if (!isWireless && wiredLevel == null) _buildTextRow('档位', '自动'),
|
|
||||||
|
|
||||||
const Spacer(),
|
|
||||||
Center(
|
|
||||||
child: Text(
|
|
||||||
'数据来自 BMS 实时日志',
|
|
||||||
style: TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.grey.shade500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 纯文本行(协议、功率、档位等)
|
Widget _buildDetailRow(String label, String value) {
|
||||||
Widget _buildTextRow(String label, String value) {
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6.0),
|
padding: const EdgeInsets.symmetric(vertical: 6.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -113,7 +84,6 @@ class ChargeDetailPage extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
label,
|
label,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
@@ -122,7 +92,6 @@ class ChargeDetailPage extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
value,
|
value,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC', // 复杂字符串保持 Harmony
|
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
@@ -132,44 +101,4 @@ class ChargeDetailPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 数值行(电压/电流,数字用 Flyme,单位用 Harmony)
|
|
||||||
Widget _buildDetailRow(String label, double value, String unit) {
|
|
||||||
return Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
label,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: Colors.black87,
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: value.toStringAsFixed(2),
|
|
||||||
style: const TextStyle(fontFamily: 'Flyme'), // 🟢 数字用 Flyme
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: unit,
|
|
||||||
style: const TextStyle(fontFamily: 'HarmonyOS_Sans_SC'),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
/// 充电入口行(显示充电状态 + 点击进入详情)
|
||||||
class ChargeEntry extends StatelessWidget {
|
class ChargeEntry extends StatelessWidget {
|
||||||
final String summary;
|
final String summary;
|
||||||
final bool isCharging;
|
final bool isCharging;
|
||||||
@@ -22,7 +23,6 @@ class ChargeEntry extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
summary,
|
summary,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC', // 🟢 混合文本用 Harmony
|
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
@@ -33,7 +33,6 @@ class ChargeEntry extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'充电信息',
|
'充电信息',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.grey.shade700,
|
color: Colors.grey.shade700,
|
||||||
@@ -43,7 +42,6 @@ class ChargeEntry extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'>',
|
'>',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Colors.grey.shade700,
|
color: Colors.grey.shade700,
|
||||||
|
|||||||
@@ -50,11 +50,7 @@ class TrendChart extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
'容量百分比变动趋势(近15天)',
|
'容量百分比变动趋势(近15天)',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
@@ -68,7 +64,6 @@ class TrendChart extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'100',
|
'100',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
@@ -77,7 +72,6 @@ class TrendChart extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
'70',
|
'70',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontFamily: 'Flyme',
|
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
@@ -145,7 +139,6 @@ class TrendChart extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
sevenDaysAgoDate,
|
sevenDaysAgoDate,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 9,
|
fontSize: 9,
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
@@ -159,7 +152,6 @@ class TrendChart extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
todayDate,
|
todayDate,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 9,
|
fontSize: 9,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
height: 1.0,
|
height: 1.0,
|
||||||
@@ -180,11 +172,7 @@ class TrendChart extends StatelessWidget {
|
|||||||
padding: EdgeInsets.only(top: 8.0),
|
padding: EdgeInsets.only(top: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
'暂无历史数据,请点击刷新按钮更新',
|
'暂无历史数据,请点击刷新按钮更新',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12, color: Colors.grey),
|
||||||
fontFamily: 'HarmonyOS_Sans_SC',
|
|
||||||
fontSize: 12,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
+1
-4
@@ -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.5.3
|
version: 1.4.7
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.9.2
|
sdk: ^3.9.2
|
||||||
@@ -75,9 +75,6 @@ flutter:
|
|||||||
weight: 400
|
weight: 400
|
||||||
- asset: assets/fonts/HarmonyOS_Sans_SC_Medium.ttf
|
- asset: assets/fonts/HarmonyOS_Sans_SC_Medium.ttf
|
||||||
weight: 500
|
weight: 500
|
||||||
- family: Flyme
|
|
||||||
fonts:
|
|
||||||
- asset: assets/fonts/flymeFont.ttf
|
|
||||||
assets:
|
assets:
|
||||||
- assets/icons/
|
- assets/icons/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user