style(front): 플랫폼별 애니메이션 패널 비율 조정
- 데스크톱/웹: 넓은 비율 (2.5) - 모바일: 16:9 비율 - HeroVsBossAnimation 레이아웃 Flexible 적용
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -186,14 +186,17 @@ class _HeroVsBossAnimationState extends State<HeroVsBossAnimation> {
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// ASCII 애니메이션 (컬러 적용)
|
||||
FittedBox(
|
||||
// ASCII 애니메이션 (컬러 적용) - 남은 공간 차지
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: RichText(
|
||||
text: _buildColoredTextSpan(frame),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
// 하단 효과 바 (컬러)
|
||||
_buildEffectBar(),
|
||||
|
||||
Reference in New Issue
Block a user