From a823490c96abd170af0ccbd062c8d71b7af3af53 Mon Sep 17 00:00:00 2001 From: hailin Date: Wed, 24 Dec 2025 02:12:36 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20=E4=BF=AE=E6=AD=A3=E7=81=AB?= =?UTF-8?q?=E6=9F=B4=E4=BA=BA=E7=BB=88=E7=82=B9=E4=BD=8D=E7=BD=AE=E8=AE=A1?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 起点: 70 (昵称区域右边) - 终点: containerWidth - 92 (红旗左边 - 火柴人宽度) - 100%时火柴人右边对齐红旗左边 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../presentation/widgets/stickman_race_widget.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 82babe79..c6ae8330 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 @@ -236,13 +236,13 @@ class _StickmanRaceWidgetState extends State final trackHeight = usableHeight / total; final verticalPosition = rank * trackHeight + 10; - // 简单直接的计算: - // 起点:昵称区域右边 (70) - // 终点:红旗左边 (containerWidth - 8(红旗right) - 24(红旗宽) - 30(火柴人半宽)) - // 火柴人中心位置 = 起点 + (终点 - 起点) * 进度 + // 简单计算: + // 起点 = 昵称区域宽度 (65) + 间距 (5) = 70 + // 终点 = 红旗左边位置 = containerWidth - 8(right) - 24(flagWidth) = containerWidth - 32 + // 火柴人宽度约 60,所以火柴人 left 值 = 终点位置 - 60 = containerWidth - 92 const double startX = 70.0; - final double endX = containerWidth - 62.0; - final double stickmanCenterX = startX + (endX - startX) * progress; + final double endX = containerWidth - 92.0; // 火柴人到达红旗时的 left 值 + final double stickmanLeft = startX + (endX - startX) * progress; return AnimatedBuilder( animation: _bounceController, @@ -287,7 +287,7 @@ class _StickmanRaceWidgetState extends State ), // 火柴人和数量标签 Positioned( - left: stickmanCenterX - 30, // 火柴人宽度60的一半 + left: stickmanLeft, top: verticalPosition - bounce, child: Column( mainAxisSize: MainAxisSize.min,