refactor(ui): 화면 및 위젯 정리

- GamePlayScreen build() 메서드 분할 (300→15 LOC)
- 애니메이션/프로그레스 패널 개선
- 설정 화면 정리
This commit is contained in:
JiWoong Sul
2026-01-21 17:34:47 +09:00
parent faf87eccb0
commit d9a2fe358c
7 changed files with 275 additions and 294 deletions

View File

@@ -1,5 +1,7 @@
import 'dart:async';
import 'package:asciineverdie/data/game_text_l10n.dart' as game_l10n;
/// 알림 타입 (Notification Type)
enum NotificationType {
levelUp, // 레벨업
@@ -62,8 +64,8 @@ class NotificationService {
show(
GameNotification(
type: NotificationType.levelUp,
title: 'LEVEL UP!',
subtitle: 'Level $newLevel',
title: game_l10n.notifyLevelUp,
subtitle: game_l10n.notifyLevel(newLevel),
data: {'level': newLevel},
duration: const Duration(seconds: 2),
),
@@ -75,7 +77,7 @@ class NotificationService {
show(
GameNotification(
type: NotificationType.questComplete,
title: 'QUEST COMPLETE!',
title: game_l10n.notifyQuestComplete,
subtitle: questName,
data: {'quest': questName},
duration: const Duration(seconds: 2),
@@ -87,8 +89,8 @@ class NotificationService {
/// actNumber: 0=프롤로그, 1=Act I, 2=Act II, ...
void showActComplete(int actNumber) {
final title = actNumber == 0
? 'PROLOGUE COMPLETE!'
: 'ACT $actNumber COMPLETE!';
? game_l10n.notifyPrologueComplete
: game_l10n.notifyActComplete(actNumber);
show(
GameNotification(
type: NotificationType.actComplete,
@@ -103,7 +105,7 @@ class NotificationService {
show(
GameNotification(
type: NotificationType.newSpell,
title: 'NEW SPELL!',
title: game_l10n.notifyNewSpell,
subtitle: spellName,
data: {'spell': spellName},
duration: const Duration(seconds: 2),
@@ -116,7 +118,7 @@ class NotificationService {
show(
GameNotification(
type: NotificationType.newEquipment,
title: 'NEW EQUIPMENT!',
title: game_l10n.notifyNewEquipment,
subtitle: equipmentName,
data: {'equipment': equipmentName, 'slot': slot},
duration: const Duration(seconds: 2),
@@ -129,7 +131,7 @@ class NotificationService {
show(
GameNotification(
type: NotificationType.bossDefeat,
title: 'BOSS DEFEATED!',
title: game_l10n.notifyBossDefeated,
subtitle: bossName,
data: {'boss': bossName},
duration: const Duration(seconds: 3),