생성 때 고른 행성 형태·색 표시 · HOME 주간 정보

This commit is contained in:
Sn-Kinos
2026-10-05 23:21:44 +09:00
parent 55424bd4a2
commit c8c1a1ae67
40 changed files with 688 additions and 40 deletions
+12 -16
View File
@@ -4,7 +4,7 @@ import '../../core/data/backend.dart' show BackendException;
import '../../core/theme/tokens.dart';
import '../../core/ui/app_dialog.dart';
import '../../core/ui/app_icons.dart';
import '../../core/ui/planet_25d.dart' show planetColors;
import '../../core/ui/planet_25d.dart' show planetColors, planetShapeImage;
import 'home_data.dart';
import '../../core/i18n/app_locale.dart';
@@ -15,7 +15,7 @@ import '../../core/i18n/app_locale.dart';
/// 생성 뒤 사용자가 외형을 바꾸는 입구는 없다. 그래서 사본의 「오브젝트 색 선택」 줄과
/// 직접 색 고르기(스포이트) 칩은 두지 않는다.
///
/// 형태 칸은 사본에서도 모두 같은 자리표시 이미지다(개별 형태 에셋은 S08 확인 대상).
/// 형태 칸 · 미리보기는 행성 형태 시트 그림이다([planetShapeImage] — 6번 칸만 자리표시, Q-A14).
class PlanetCreateScreen extends StatefulWidget {
const PlanetCreateScreen({
super.key,
@@ -68,10 +68,6 @@ class _PlanetCreateScreenState extends State<PlanetCreateScreen> {
});
}
static const _placeholder = AssetImage(
'assets/figma/planet-shape-placeholder.png',
);
static const _heading = TextStyle(
fontFamily: AppFonts.body,
fontSize: 18,
@@ -80,6 +76,10 @@ class _PlanetCreateScreenState extends State<PlanetCreateScreen> {
color: AppColors.onCosmic,
);
/// 고른 형태 그림 — HOME · GALAXY · 행성 상세 · MY 가 그리는 그림과 같은 표([planetShapeImage]).
Image get _shapeImage =>
Image.asset(planetShapeImage(PlanetCreateScreen.shapes[_shape])!);
Widget _preview() => Center(
child: SizedBox.square(
dimension: 212,
@@ -89,9 +89,9 @@ class _PlanetCreateScreenState extends State<PlanetCreateScreen> {
_colors[_color].$2,
BlendMode.modulate,
),
child: const Image(image: _placeholder),
child: _shapeImage,
)
: const Image(image: _placeholder),
: _shapeImage,
),
);
@@ -112,14 +112,10 @@ class _PlanetCreateScreenState extends State<PlanetCreateScreen> {
? Border.all(color: AppColors.cosmicAccent, width: 2)
: null,
),
// 사본 칸 그림(렌더에서 4 안쪽을 자른 것). 6번 칸은 사본에서 버튼에 가려
// 모양이 보이지 않아 자리표시를 둔다.
padding: i < 5 ? const EdgeInsets.all(4) : null,
child: Image.asset(
i < 5
? 'assets/figma/planet-shape-${i + 1}.png'
: 'assets/figma/planet-shape-placeholder.png',
),
// 사본 칸 그림 — 행성 형태 시트에서 잘라 낸 투명 그림([planetShapeImage]). 6번 칸은
// 사본에서 버튼에 가려 모양이 보이지 않아 자리표시를 둔다(Q-A14).
padding: const EdgeInsets.all(4),
child: Image.asset(planetShapeImage(PlanetCreateScreen.shapes[i])!),
),
),
);