feat(ui): 반응형 레이아웃 및 저장 시스템 개선
## 반응형 레이아웃 - 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 라인) ## 테스트 - 관련 테스트 파일 업데이트
This commit is contained in:
135
lib/src/features/game/pages/quest_page.dart
Normal file
135
lib/src/features/game/pages/quest_page.dart
Normal file
@@ -0,0 +1,135 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:askiineverdie/l10n/app_localizations.dart';
|
||||
import 'package:askiineverdie/src/core/model/game_state.dart';
|
||||
|
||||
/// 퀘스트 페이지 (캐로셀)
|
||||
///
|
||||
/// 퀘스트 히스토리 및 현재 퀘스트 진행 상황 표시.
|
||||
class QuestPage extends StatelessWidget {
|
||||
const QuestPage({super.key, required this.questHistory, required this.quest});
|
||||
|
||||
final List<HistoryEntry> questHistory;
|
||||
final ProgressBarState quest;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final localizations = L10n.of(context);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
// 헤더
|
||||
_buildSectionHeader(context, localizations.quests),
|
||||
|
||||
// 퀘스트 목록
|
||||
Expanded(child: _buildQuestList(context)),
|
||||
|
||||
// 퀘스트 프로그레스
|
||||
_buildProgressSection(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 _buildQuestList(BuildContext context) {
|
||||
final localizations = L10n.of(context);
|
||||
|
||||
if (questHistory.isEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
localizations.noActiveQuests,
|
||||
style: const TextStyle(fontSize: 13, color: Colors.grey),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
itemCount: questHistory.length,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
itemBuilder: (context, index) {
|
||||
final entry = questHistory[index];
|
||||
final isCurrentQuest =
|
||||
index == questHistory.length - 1 && !entry.isComplete;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
if (isCurrentQuest)
|
||||
const Icon(Icons.arrow_right, size: 18, color: Colors.blue)
|
||||
else
|
||||
Icon(
|
||||
entry.isComplete
|
||||
? Icons.check_box
|
||||
: Icons.check_box_outline_blank,
|
||||
size: 18,
|
||||
color: entry.isComplete ? Colors.green : Colors.grey,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
entry.caption,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
decoration: entry.isComplete
|
||||
? TextDecoration.lineThrough
|
||||
: null,
|
||||
color: isCurrentQuest
|
||||
? Colors.blue
|
||||
: entry.isComplete
|
||||
? Colors.grey
|
||||
: null,
|
||||
fontWeight: isCurrentQuest ? FontWeight.bold : null,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildProgressSection(BuildContext context) {
|
||||
final localizations = L10n.of(context);
|
||||
final progress = quest.max > 0
|
||||
? (quest.position / quest.max).clamp(0.0, 1.0)
|
||||
: 0.0;
|
||||
final percentage = (progress * 100).toInt();
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
value: progress,
|
||||
backgroundColor: Colors.green.withValues(alpha: 0.2),
|
||||
valueColor: const AlwaysStoppedAnimation<Color>(Colors.green),
|
||||
minHeight: 12,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
localizations.percentComplete(percentage),
|
||||
style: TextStyle(fontSize: 10, color: Colors.grey.shade600),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user