Figma 설명 프레임 반영 — 로그인·온보딩·스플래시 · HOME · GALAXY · 퀘스트·이클립스·알림

This commit is contained in:
Sn-Kinos
2026-10-06 03:03:20 +09:00
parent 64825e72b0
commit ecf5998725
77 changed files with 2703 additions and 640 deletions
@@ -17,7 +17,11 @@ enum NotificationKind {
like(Icons.favorite_border),
comment(Icons.mode_comment_outlined),
campaign(Icons.campaign_outlined),
quest(Icons.checklist_rtl);
quest(Icons.checklist_rtl),
/// 행성 진화 참여 알림(9/21 회신 「당신도 이 진화에 함께했습니다」). Figma `518:88353` 6종 밖이라
/// 이동하지 않는다 — 예전에는 아이템 사용으로 떨어져 노란 아이템 배지 · 「아이템 사용」으로 보였다.
evolution(Icons.public);
const NotificationKind(this.icon);
@@ -30,12 +34,13 @@ enum NotificationKind {
comment => appL10n.notifKindComment,
campaign => appL10n.notifKindCampaign,
quest => appL10n.notifKindQuest,
evolution => appL10n.notifKindEvolution,
};
/// 눌러서 갈 곳. `null` 이면 이동하지 않는다 — 명세가 이클립스와 아이템
/// 사용을 *클릭 이동 X* 로 정했다.
String? get target => switch (this) {
eclipse || itemUsed => null,
eclipse || itemUsed || evolution => null,
like || comment => appL10n.notifTargetPost,
campaign => appL10n.notifTargetCampaign,
quest => appL10n.notifTargetQuest,
@@ -66,6 +71,7 @@ enum NotificationKind {
'comment' => NotificationKind.comment,
'campaign' => NotificationKind.campaign,
'quest' => NotificationKind.quest,
'evolution' => NotificationKind.evolution,
_ => NotificationKind.itemUsed,
};
}
@@ -70,44 +70,52 @@ class _NotificationScreenState extends State<NotificationScreen> {
}
final groups = groupNotifications(items);
return Scaffold(
appBar: AppBar(
title: Text(context.l10n.homeNotificationsTooltip),
// 명세 — 뒤로가기 시 읽음 상태값을 돌려준다.
leading: BackButton(
onPressed: () => Navigator.of(context).pop({..._read}),
// 명세 `518:88347` — 뒤로가기는 *이전 화면 이동 및 읽음 상태값 반환*. 시스템 뒤로가기(Android
// 제스처 · iOS 스와이프)도 같은 값을 돌려준다.
return PopScope<Object?>(
canPop: false,
onPopInvokedWithResult: (didPop, _) {
if (!didPop) Navigator.of(context).pop({..._read});
},
child: Scaffold(
appBar: AppBar(
title: Text(context.l10n.homeNotificationsTooltip),
// 명세 — 뒤로가기 시 읽음 상태값을 돌려준다.
leading: BackButton(
onPressed: () => Navigator.of(context).pop({..._read}),
),
),
),
body: items.isEmpty
? Center(child: Text(context.l10n.notifEmpty, style: t.bodyMedium))
: ListView(
padding: const EdgeInsets.symmetric(horizontal: AppSpace.s4),
children: [
for (final group in groups)
// 시안 날짜 묶음 — 위아래 20 · 머리글과 항목 사이 20 · 항목 사이 24 · 아래 #1a1a1a 줄.
Container(
padding: const EdgeInsets.symmetric(vertical: 20),
foregroundDecoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xFF1A1A1A)),
body: items.isEmpty
? Center(child: Text(context.l10n.notifEmpty, style: t.bodyMedium))
: ListView(
padding: const EdgeInsets.symmetric(horizontal: AppSpace.s4),
children: [
for (final group in groups)
// 시안 날짜 묶음 — 위아래 20 · 머리글과 항목 사이 20 · 항목 사이 24 · 아래 #1a1a1a 줄.
Container(
padding: const EdgeInsets.symmetric(vertical: 20),
foregroundDecoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Color(0xFF1A1A1A)),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
group.label,
style: _style(_grey, height: 24 / 14),
),
for (final (i, item) in group.items.indexed) ...[
SizedBox(height: i == 0 ? 20 : 24),
_tile(item),
],
],
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
group.label,
style: _style(_grey, height: 24 / 14),
),
for (final (i, item) in group.items.indexed) ...[
SizedBox(height: i == 0 ? 20 : 24),
_tile(item),
],
],
),
),
],
),
],
),
),
);
}
@@ -187,8 +195,9 @@ class _NotificationScreenState extends State<NotificationScreen> {
}
final screen = _screenFor(item);
if (screen == null || !mounted) return;
await Navigator.of(context)
.push<void>(MaterialPageRoute(builder: (_) => screen));
await Navigator.of(
context,
).push<void>(MaterialPageRoute(builder: (_) => screen));
}
}
@@ -211,6 +220,7 @@ TextStyle _style(Color color, {double height = 1.3}) => TextStyle(
NotificationKind.campaign => (Colors.black, _icon('message_circle')),
NotificationKind.like => (const Color(0xFFFF5151), _icon('heart')),
NotificationKind.eclipse => (Colors.black, _icon('planet')),
NotificationKind.evolution => (Colors.black, _icon('planet')),
NotificationKind.itemUsed => (const Color(0xFFCEBF3B), _icon('water_ec')),
NotificationKind.quest => (
AppColors.cosmicSurfaceContainer,