尝试针对魅族20系设计新的计算逻辑

This commit is contained in:
2026-07-05 23:23:30 +08:00
parent 14416be48e
commit 20e29f3043
13 changed files with 1423 additions and 1036 deletions
+55
View File
@@ -0,0 +1,55 @@
import 'package:flutter/material.dart';
class ChargeEntry extends StatelessWidget {
final String summary;
final bool isCharging;
final VoidCallback onTap;
const ChargeEntry({
super.key,
required this.summary,
required this.isCharging,
required this.onTap,
});
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: isCharging ? onTap : null,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
summary,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.black87,
),
),
Row(
children: [
Text(
'充电信息',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.grey.shade700,
),
),
const SizedBox(width: 4),
Text(
'>',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Colors.grey.shade700,
),
),
],
),
],
),
);
}
}