From 5d8e1157b9f9aa338e26214a7161b9291e453dbb Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Thu, 29 Jan 2026 19:59:39 +0900 Subject: [PATCH] =?UTF-8?q?fix(calendar):=20=EC=B6=94=EC=B2=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D=20=EC=82=AD=EC=A0=9C=20=ED=99=95=EC=9D=B8=20=ED=8C=9D?= =?UTF-8?q?=EC=97=85=20=EB=B0=8F=20SafeArea=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - recommendation_record_card: 삭제 전 확인 팝업 추가 - calendar_screen: 상세보기 BottomSheet에 SafeArea 적용 - 안드로이드 네비게이션 바에 버튼이 가려지는 문제 해결 --- .../pages/calendar/calendar_screen.dart | 11 ++++--- .../widgets/recommendation_record_card.dart | 29 ++++++++++++++++++- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/lib/presentation/pages/calendar/calendar_screen.dart b/lib/presentation/pages/calendar/calendar_screen.dart index aaa9153..77975c0 100644 --- a/lib/presentation/pages/calendar/calendar_screen.dart +++ b/lib/presentation/pages/calendar/calendar_screen.dart @@ -586,9 +586,11 @@ class _CalendarScreenState extends ConsumerState final recoTime = recommendationRecord?.recommendationDate; final isVisitConfirmed = visitRecord?.isConfirmed == true; - return Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 16, 20), - child: Column( + return SafeArea( + top: false, + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 12, 16, 20), + child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -689,7 +691,8 @@ class _CalendarScreenState extends ConsumerState label: const Text('추천 방문 기록으로 저장'), ), ), - ], + ], + ), ), ); }, diff --git a/lib/presentation/pages/calendar/widgets/recommendation_record_card.dart b/lib/presentation/pages/calendar/widgets/recommendation_record_card.dart index f04c221..58ce99f 100644 --- a/lib/presentation/pages/calendar/widgets/recommendation_record_card.dart +++ b/lib/presentation/pages/calendar/widgets/recommendation_record_card.dart @@ -27,6 +27,33 @@ class RecommendationRecordCard extends ConsumerWidget { return '$hour:$minute'; } + Future _showDeleteConfirmation(BuildContext context) async { + final confirmed = await showDialog( + context: context, + builder: (context) => AlertDialog( + title: const Text('추천 기록 삭제'), + content: const Text('이 추천 기록을 삭제하시겠습니까?'), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(false), + child: const Text('취소'), + ), + TextButton( + onPressed: () => Navigator.of(context).pop(true), + style: TextButton.styleFrom( + foregroundColor: AppColors.lightError, + ), + child: const Text('삭제'), + ), + ], + ), + ); + + if (confirmed == true) { + onDelete(); + } + } + @override Widget build(BuildContext context, WidgetRef ref) { final isDark = Theme.of(context).brightness == Brightness.dark; @@ -166,7 +193,7 @@ class RecommendationRecordCard extends ConsumerWidget { Align( alignment: Alignment.centerRight, child: TextButton( - onPressed: onDelete, + onPressed: () => _showDeleteConfirmation(context), style: TextButton.styleFrom( foregroundColor: Colors.redAccent, padding: const EdgeInsets.only(top: 6),