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( fontFamily: 'HarmonyOS_Sans_SC', // 🟢 混合文本用 Harmony fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black87, ), ), Row( children: [ Text( '充电信息', style: TextStyle( fontFamily: 'HarmonyOS_Sans_SC', fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey.shade700, ), ), const SizedBox(width: 4), Text( '>', style: TextStyle( fontFamily: 'HarmonyOS_Sans_SC', fontSize: 16, fontWeight: FontWeight.w500, color: Colors.grey.shade700, ), ), ], ), ], ), ); } }