generated from ttipo/project-base
fix(flutter): 사진 없는 아바타·다이어리 표지에 시안 바탕색 반영
시안의 사진 칸(image-slot)은 사진이 없을 때 rgba(0,0,0,.04) 바탕 위에 기본 그림을 올린다. 아이 아바타는 바탕이 비어 있었고, 다이어리 표지는 고유색이 시안보다 밝게 보였다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user