diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 520ae2a..1dcf429 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -575,20 +575,25 @@ class _HomeScreenState extends State { ), child: Row( mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, children: [ Icon(_sessionService.isActive ? Icons.play_arrow_rounded : Icons.play_circle_fill, size: 22), const SizedBox(width: 8), - Text( - _sessionService.isActive - ? (_sessionService.isWaitingForNextMed - ? '两药间隔已结束:点击开始第二组' - : (_sessionService.isFinished - ? '雾化已完成:点击确认打卡' - : '继续进行中雾化 (${_formatTime(_sessionService.remainingSeconds)})')) - : (_activeCanisters.length > 1 - ? '按方案开始雾化 (万托林先行 • 带$crossMinutes分钟间隔)' - : '开始吸入 ${_activeCanisters.first.name.split(" ")[0]}'), - style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold), + Flexible( + child: Text( + _sessionService.isActive + ? (_sessionService.isWaitingForNextMed + ? '两药间隔已结束:开始第二组' + : (_sessionService.isFinished + ? '雾化已完成:确认打卡' + : '继续雾化 (${_formatTime(_sessionService.remainingSeconds)})')) + : (_activeCanisters.length > 1 + ? '开始联合雾化 (万托林先行)' + : '开始吸入 ${_activeCanisters.first.name.split(" ")[0]}'), + style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ], ), @@ -665,9 +670,13 @@ class _HomeScreenState extends State { children: [ Container(width: 2, height: 18, color: const Color(0xFFF59E0B)), const SizedBox(width: 19), - Text( - '⏳ 间隔等待 $crossMinutes 分钟 (万托林舒张气道)', - style: const TextStyle(fontSize: 11, color: Color(0xFFB45309), fontWeight: FontWeight.w600), + Flexible( + child: Text( + '⏳ 间隔等待 $crossMinutes 分钟 (万托林舒张气道,到点提醒)', + style: const TextStyle(fontSize: 11, color: Color(0xFFB45309), fontWeight: FontWeight.w600), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ], ),