From 0a6402477364bc13fc813ab32e554f25e7970557 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 23 Dec 2025 03:29:11 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-app):=20=E4=B8=BA=E6=AF=8F=E4=B8=AA?= =?UTF-8?q?=E7=81=AB=E6=9F=B4=E4=BA=BA=E8=B7=91=E9=81=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E7=BB=88=E7=82=B9=E6=97=97=E5=B8=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除单一的共享终点旗帜 - 为每个跑道生成独立的红旗,与火柴人垂直位置对齐 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../widgets/stickman_race_widget.dart | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart b/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart index 77503ad5..40200871 100644 --- a/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart +++ b/frontend/mobile-app/lib/features/authorization/presentation/widgets/stickman_race_widget.dart @@ -171,6 +171,10 @@ class _StickmanRaceWidgetState extends State final trackCount = sortedRankings.length; final raceTrackHeight = (trackCount * _minTrackHeight).clamp(160.0, double.infinity); + // 计算每个跑道的高度和位置 + final usableHeight = raceTrackHeight - 40; + final trackHeight = usableHeight / trackCount; + return SizedBox( height: raceTrackHeight, child: Stack( @@ -184,31 +188,19 @@ class _StickmanRaceWidgetState extends State ), ), - // 终点红旗 - Positioned( - right: 8, - top: 0, - bottom: 40, - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Icon( - Icons.flag, - color: Colors.red, - size: 32, - ), - SizedBox(height: 4), - Text( - '终点', - style: TextStyle( - fontSize: 10, - fontFamily: 'Inter', - color: Color(0xFF8B5A2B), - ), - ), - ], - ), - ), + // 每个跑道的终点红旗 + ...List.generate(trackCount, (index) { + final verticalPosition = index * trackHeight + 10 + trackHeight / 2 - 16; + return Positioned( + right: 8, + top: verticalPosition, + child: const Icon( + Icons.flag, + color: Colors.red, + size: 24, + ), + ); + }), // 火柴人们 ...sortedRankings.asMap().entries.map((entry) {