## 반응형 레이아웃 - app.dart: 화면 크기별 레이아웃 분기 로직 추가 (+173 라인) - game_play_screen.dart: 반응형 UI 구조 개선 - layouts/, pages/ 디렉토리 추가 (새 레이아웃 시스템) - carousel_nav_bar.dart: 캐러셀 네비게이션 바 추가 - enhanced_animation_panel.dart: 향상된 애니메이션 패널 ## 저장 시스템 - save_manager.dart: 저장 관리 기능 확장 - save_repository.dart: 저장소 인터페이스 개선 - save_service.dart: 저장 서비스 로직 추가 ## UI 개선 - notification_service.dart: 알림 시스템 기능 확장 - notification_overlay.dart: 오버레이 UI 개선 - equipment_stats_panel.dart: 장비 스탯 패널 개선 - cinematic_view.dart: 시네마틱 뷰 개선 - new_character_screen.dart: 캐릭터 생성 화면 개선 ## 다국어 - game_text_l10n.dart: 텍스트 추가 (+182 라인) ## 테스트 - 관련 테스트 파일 업데이트
134 lines
3.8 KiB
Dart
134 lines
3.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:askiineverdie/l10n/app_localizations.dart';
|
|
import 'package:askiineverdie/src/core/l10n/game_data_l10n.dart';
|
|
import 'package:askiineverdie/src/core/model/game_state.dart';
|
|
import 'package:askiineverdie/src/features/game/widgets/stats_panel.dart';
|
|
|
|
/// 캐릭터시트 페이지 (캐로셀 - 기본 페이지)
|
|
///
|
|
/// 트레잇, 스탯, 경험치 표시.
|
|
class CharacterSheetPage extends StatelessWidget {
|
|
const CharacterSheetPage({
|
|
super.key,
|
|
required this.traits,
|
|
required this.stats,
|
|
required this.exp,
|
|
});
|
|
|
|
final Traits traits;
|
|
final Stats stats;
|
|
final ProgressBarState exp;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final localizations = L10n.of(context);
|
|
|
|
return SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
// 트레잇
|
|
_buildSectionHeader(context, localizations.traits),
|
|
_buildTraitsList(context),
|
|
|
|
// 스탯
|
|
_buildSectionHeader(context, localizations.stats),
|
|
StatsPanel(stats: stats),
|
|
|
|
// 경험치
|
|
_buildSectionHeader(context, localizations.experience),
|
|
_buildExpBar(context),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildSectionHeader(BuildContext context, String title) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
|
color: Theme.of(context).colorScheme.primaryContainer,
|
|
child: Text(
|
|
title,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.bold,
|
|
fontSize: 13,
|
|
color: Theme.of(context).colorScheme.onPrimaryContainer,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildTraitsList(BuildContext context) {
|
|
final localizations = L10n.of(context);
|
|
final traitData = [
|
|
(localizations.traitName, traits.name),
|
|
(localizations.traitRace, GameDataL10n.getRaceName(context, traits.race)),
|
|
(
|
|
localizations.traitClass,
|
|
GameDataL10n.getKlassName(context, traits.klass),
|
|
),
|
|
(localizations.traitLevel, '${traits.level}'),
|
|
];
|
|
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
|
child: Column(
|
|
children: traitData.map((t) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 2),
|
|
child: Row(
|
|
children: [
|
|
SizedBox(
|
|
width: 60,
|
|
child: Text(
|
|
t.$1,
|
|
style: TextStyle(fontSize: 12, color: Colors.grey.shade600),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Text(
|
|
t.$2,
|
|
style: const TextStyle(
|
|
fontSize: 13,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}).toList(),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildExpBar(BuildContext context) {
|
|
final localizations = L10n.of(context);
|
|
final progress = exp.max > 0
|
|
? (exp.position / exp.max).clamp(0.0, 1.0)
|
|
: 0.0;
|
|
final remaining = exp.max - exp.position;
|
|
|
|
return Padding(
|
|
padding: const EdgeInsets.all(12),
|
|
child: Column(
|
|
children: [
|
|
LinearProgressIndicator(
|
|
value: progress,
|
|
backgroundColor: Colors.blue.withValues(alpha: 0.2),
|
|
valueColor: const AlwaysStoppedAnimation<Color>(Colors.blue),
|
|
minHeight: 12,
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
'$remaining ${localizations.xpNeededForNextLevel}',
|
|
style: TextStyle(fontSize: 10, color: Colors.grey.shade600),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|