From 877c833f7d68ba7ca98683297653bf6dbc84875c Mon Sep 17 00:00:00 2001 From: TtiPo Date: Tue, 29 Sep 2026 00:08:19 +0900 Subject: [PATCH] =?UTF-8?q?fix(flutter):=20=EC=82=AC=EC=A7=84=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=95=84=EB=B0=94=ED=83=80=C2=B7=EB=8B=A4=EC=9D=B4?= =?UTF-8?q?=EC=96=B4=EB=A6=AC=20=ED=91=9C=EC=A7=80=EC=97=90=20=EC=8B=9C?= =?UTF-8?q?=EC=95=88=20=EB=B0=94=ED=83=95=EC=83=89=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 시안의 사진 칸(image-slot)은 사진이 없을 때 rgba(0,0,0,.04) 바탕 위에 기본 그림을 올린다. 아이 아바타는 바탕이 비어 있었고, 다이어리 표지는 고유색이 시안보다 밝게 보였다. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../lib/features/diary/presentation/widgets/diary_cover.dart | 5 ++++- .../lib/features/pet/presentation/widgets/pet_avatar.dart | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/flutter/lib/features/diary/presentation/widgets/diary_cover.dart b/flutter/lib/features/diary/presentation/widgets/diary_cover.dart index 81c895f..d0b919e 100644 --- a/flutter/lib/features/diary/presentation/widgets/diary_cover.dart +++ b/flutter/lib/features/diary/presentation/widgets/diary_cover.dart @@ -36,6 +36,9 @@ class MoodIcon extends StatelessWidget { } } +/// 사진이 없는 표지 칸의 바탕 막 (시안 image-slot 의 rgba(0,0,0,.04)) +const Color _kEmptyCoverShade = Color(0x0A000000); + /// 다이어리 표지 — 사진(없으면 고유색), 아이들, 책갈피 리본, 이름·기록 수 class DiaryCoverTile extends StatelessWidget { const DiaryCoverTile({super.key, required this.diary, required this.postCount, required this.onTap}); @@ -68,7 +71,7 @@ class DiaryCoverTile extends StatelessWidget { fit: StackFit.expand, children: [ ColoredBox(color: diary.tint), - if (cover != null) PetPhotoImage(path: cover), + if (cover != null) PetPhotoImage(path: cover) else const ColoredBox(color: _kEmptyCoverShade), const DecoratedBox( decoration: BoxDecoration( gradient: LinearGradient( diff --git a/flutter/lib/features/pet/presentation/widgets/pet_avatar.dart b/flutter/lib/features/pet/presentation/widgets/pet_avatar.dart index cdf9859..281f38a 100644 --- a/flutter/lib/features/pet/presentation/widgets/pet_avatar.dart +++ b/flutter/lib/features/pet/presentation/widgets/pet_avatar.dart @@ -8,6 +8,9 @@ import 'package:tma_app/features/pet/presentation/widgets/pet_photo_image.dart'; /// 사진이 없을 때 원 테두리 — 시안 .rup-avatar--slot const Color _kEmptyRing = Color(0xFFC8C8C8); +/// 사진이 없을 때 원 바탕 — 시안 image-slot 의 rgba(0,0,0,.04) +const Color _kEmptyFill = Color(0x0A000000); + /// [PetAvatar.ring] — 흰 틈 2.5 + 아이 색 고리 1.5 (시안 box-shadow 0 0 0 2.5px surface, 0 0 0 4px tint) const double _kRingGap = 2.5; const double _kRingOuter = 4; @@ -33,6 +36,7 @@ class PetAvatar extends StatelessWidget { height: size, decoration: BoxDecoration( shape: BoxShape.circle, + color: photo == null ? _kEmptyFill : null, border: photo == null ? Border.all(color: _kEmptyRing, width: 1.5) : null, // 뒤에 오는 그림자가 위에 그려진다 — 색 고리 위에 흰 틈을 얹는다 boxShadow: ring