From 83e18e5448381f83334841117f0e1554179374e9 Mon Sep 17 00:00:00 2001 From: shen <> Date: Tue, 27 Oct 2026 06:39:47 -0700 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E7=B2=BE=E7=AE=80=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E8=A1=8C=E5=8A=A8=E6=8C=89=E9=92=AE=E6=96=87=E6=9C=AC=E5=B9=B6?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=87=AA=E9=80=82=E5=BA=94=E6=88=AA=E6=96=AD?= =?UTF-8?q?=EF=BC=8C=E5=BD=BB=E5=BA=95=E6=9D=9C=E7=BB=9D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=96=87=E5=AD=97=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/screens/home_screen.dart | 37 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) 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, + ), ), ], ),