From be56825ef9d147ce977d5cdcab15760863ce7836 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Mon, 5 Jan 2026 19:51:48 +0900 Subject: [PATCH] =?UTF-8?q?style(front):=20=ED=94=8C=EB=9E=AB=ED=8F=BC?= =?UTF-8?q?=EB=B3=84=20=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=ED=8C=A8=EB=84=90=20=EB=B9=84=EC=9C=A8=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 데스크톱/웹: 넓은 비율 (2.5) - 모바일: 16:9 비율 - HeroVsBossAnimation 레이아웃 Flexible 적용 --- lib/src/features/front/front_screen.dart | 18 +++++++++++++++--- .../front/widgets/hero_vs_boss_animation.dart | 13 ++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/src/features/front/front_screen.dart b/lib/src/features/front/front_screen.dart index 08de888..20d6c78 100644 --- a/lib/src/features/front/front_screen.dart +++ b/lib/src/features/front/front_screen.dart @@ -1,3 +1,6 @@ +import 'dart:io' show Platform; + +import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:asciineverdie/data/game_text_l10n.dart' as game_l10n; @@ -168,14 +171,23 @@ class _RetroHeader extends StatelessWidget { class _AnimationPanel extends StatelessWidget { const _AnimationPanel(); + /// 플랫폼별 비율 반환 (데스크톱: 넓게, 모바일: 높게) + double _getAspectRatio() { + if (kIsWeb) return 2.5; // 웹: 넓은 비율 + if (Platform.isMacOS || Platform.isWindows || Platform.isLinux) { + return 2.5; // 데스크톱: 넓은 비율 + } + return 16 / 9; // 모바일(iOS/Android): 16:9 + } + @override Widget build(BuildContext context) { return RetroPanel( title: 'BATTLE', padding: const EdgeInsets.all(8), - child: const AspectRatio( - aspectRatio: 16 / 9, - child: HeroVsBossAnimation(), + child: AspectRatio( + aspectRatio: _getAspectRatio(), + child: const HeroVsBossAnimation(), ), ); } diff --git a/lib/src/features/front/widgets/hero_vs_boss_animation.dart b/lib/src/features/front/widgets/hero_vs_boss_animation.dart index 9850dc8..7c76e32 100644 --- a/lib/src/features/front/widgets/hero_vs_boss_animation.dart +++ b/lib/src/features/front/widgets/hero_vs_boss_animation.dart @@ -186,12 +186,15 @@ class _HeroVsBossAnimationState extends State { ], ), child: Column( + mainAxisSize: MainAxisSize.min, children: [ - // ASCII 애니메이션 (컬러 적용) - FittedBox( - fit: BoxFit.scaleDown, - child: RichText( - text: _buildColoredTextSpan(frame), + // ASCII 애니메이션 (컬러 적용) - 남은 공간 차지 + Flexible( + child: FittedBox( + fit: BoxFit.scaleDown, + child: RichText( + text: _buildColoredTextSpan(frame), + ), ), ), const SizedBox(height: 8),