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) {