성운명 오류 문구 줄바꿈 · 옛 행성 그림 통일 · 광고 안내 모달 줄바꿈

This commit is contained in:
Sn-Kinos
2026-10-06 04:12:13 +09:00
parent 65f73280aa
commit 99b9bb8665
14 changed files with 114 additions and 34 deletions
+8
View File
@@ -3,6 +3,14 @@ import 'package:flutter/material.dart';
import '../i18n/app_locale.dart';
import '../theme/tokens.dart';
/// 한국어 어절 단위 줄바꿈 — 글자 사이에 WORD JOINER(U+2060)를 넣어 공백에서만 줄을 바꾼다.
/// Flutter 는 한글을 음절마다 끊어 「얻으세 / 요.」처럼 낱말 중간에서 줄을 바꾼다(10/6 실기기 D-4).
/// 한 어절이 한 줄보다 길면 그 어절만 글자 단위로 끊긴다(엔진 기본).
String keepWords(String text) => text.splitMapJoin(
RegExp(r'\s+'),
onNonMatch: (word) => word.characters.join('\u2060'),
);
/// 앱 공통 확인 창 — Figma `2066:17799`(행성 생성 확인) · `554:24669`(설정 확인 팝업).
///
/// 카드 312 폭 · #282828 r12 · 안쪽 24/16 · 문구 16/600 가운데 정렬,
+29
View File
@@ -54,6 +54,35 @@ class LivePlanet25D extends StatelessWidget {
);
}
/// 정지 그림의 실시간판 — 지켜보는 행성의 형태 · 색, 없으면 [planetFallbackImage].
/// 히어로([LivePlanet25D])와 같은 원천이라 접힌 앱 바의 작은 그림이 히어로와 갈리지 않는다.
class LivePlanetArt extends StatelessWidget {
const LivePlanetArt({
super.key,
required this.fandomId,
required this.watch,
required this.size,
this.nebula = false,
});
final String fandomId;
final PlanetWatch watch;
final double size;
final bool nebula;
@override
Widget build(BuildContext context) => LiveStreamBuilder<PlanetVisualState>(
key: ValueKey(('planet-art', fandomId)),
create: () => watch(fandomId),
builder: (context, state) => PlanetArt(
fallback: planetFallbackImage(fandomId, nebula: nebula),
planetType: nebula ? null : state?.planetType,
colorKey: state?.colorKey,
width: size,
height: size,
),
);
}
/// 배경 광량만 바꿔 콘텐츠의 가독성과 화면 구조는 유지한다.
class LivePlanetLighting extends StatelessWidget {
const LivePlanetLighting({
+10
View File
@@ -71,6 +71,16 @@ String? planetShapeImage(String? planetType) {
return n == null ? null : 'assets/figma/planet-shape-$n.png';
}
/// 형태(`planetType`)가 없는 행성 · 성운의 그림 — **앱 전체가 이 한 함수로 고른다.** 화면마다
/// 따로 고르면 같은 옛 행성이 내 행성 격자에서는 파란 행성, 검색 · 상세에서는 보라 행성으로
/// 달라진다(10/6 실기기 C-5). 성운은 성운 그림, 행성은 시안 행성 그림 두 장 중 id 로 하나.
// ponytail: 형태 없는 옛 데이터용 고정 두 그림. 모든 행성에 형태가 생기면 지운다.
String planetFallbackImage(String id, {bool nebula = false}) => nebula
? 'assets/figma/nebula-card.png'
: id.codeUnits.fold<int>(0, (a, c) => a + c).isEven
? 'assets/figma/planet-detail-hero.png'
: 'assets/figma/planet-earth.png';
/// 정지 그림 — 형태 · 색을 입힌 행성(목록 카드 · MY). 형태가 없으면 [fallback] 그림 그대로다.
/// 색은 [Planet25D] 와 같은 곱하기 합성이다.
class PlanetArt extends StatelessWidget {