diff --git a/frontend/ongi/lib/screens/health/add_pill_screen.dart b/frontend/ongi/lib/screens/health/add_pill_screen.dart index 410a9d9..0018c32 100644 --- a/frontend/ongi/lib/screens/health/add_pill_screen.dart +++ b/frontend/ongi/lib/screens/health/add_pill_screen.dart @@ -260,10 +260,22 @@ class _AddPillScreenState extends State { ); if (!mounted) return; - Navigator.pushReplacement( - context, - MaterialPageRoute(builder: (context) => const PillUpdatePopup()), - ); + + // 즉시 홈으로 돌아가면서 성공 결과 전달 + Navigator.pop(context, true); + + // 성공 팝업을 약간 지연 후 표시 (홈 화면이 먼저 업데이트되도록) + Future.delayed(const Duration(milliseconds: 100), () { + if (!mounted) return; + showDialog( + context: context, + barrierDismissible: true, + builder: (BuildContext context) => Dialog( + backgroundColor: Colors.transparent, + child: const PillUpdatePopup(), + ), + ); + }); } catch (e) { if (!mounted) return; ScaffoldMessenger.of( diff --git a/frontend/ongi/lib/screens/health/exercise_record_screen.dart b/frontend/ongi/lib/screens/health/exercise_record_screen.dart index 269c605..eb726cb 100644 --- a/frontend/ongi/lib/screens/health/exercise_record_screen.dart +++ b/frontend/ongi/lib/screens/health/exercise_record_screen.dart @@ -235,7 +235,7 @@ class _ExerciseRecordScreenState extends State { _dateCarouselController.jumpToPage(targetPage); } - // 새로운 날짜의 서버 데이터 조회 + //새로운 날짜의 서버 데이터 조회 _loadExerciseFromServer(normalizedDate); Future.delayed(const Duration(milliseconds: 100), () { @@ -642,9 +642,9 @@ class _ExerciseRecordScreenState extends State { height: 1, ), ), - const Text( - '다 채우셨나요?', - style: TextStyle( + Text( + _isChild ? '다 채우셨을까요?' : '다 채우셨나요?', + style: const TextStyle( fontSize: 40, color: Colors.white, fontWeight: FontWeight.w600, diff --git a/frontend/ongi/lib/screens/health/health_home_screen.dart b/frontend/ongi/lib/screens/health/health_home_screen.dart index f7736b7..cbca5f9 100644 --- a/frontend/ongi/lib/screens/health/health_home_screen.dart +++ b/frontend/ongi/lib/screens/health/health_home_screen.dart @@ -410,7 +410,7 @@ class _HealthHomeScreenState extends State { ), SizedBox(height: 3), Text( - '입력되지 않았어요!', + '입력되지 \n않았어요!', style: TextStyle( fontSize: 38, fontWeight: FontWeight.w600, @@ -539,54 +539,65 @@ class _HealthHomeScreenState extends State { if (_isChild && !_isLoadingParents) { // 자녀인 경우 드롭다운 표시 return Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(25), - boxShadow: [ - BoxShadow( - color: Colors.black38, - blurRadius: 4, - offset: const Offset(0, 4), - ), - ], - ), - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), - child: DropdownButtonHideUnderline( - child: DropdownButton( - value: _selectedParentId, - icon: const SizedBox.shrink(), - dropdownColor: Colors.white, - isDense: false, - itemHeight: 65, - borderRadius: BorderRadius.circular(20), - style: const TextStyle( - fontSize: 60, - fontWeight: FontWeight.w800, - color: AppColors.ongiOrange, - ), - items: _parentMembers.map((parent) { - return DropdownMenuItem( - value: parent['uuid'], - child: Text( - _formatNameForDisplay(parent['name']), - style: const TextStyle( - fontSize: 60, - fontWeight: FontWeight.w800, - color: AppColors.ongiOrange, + Flexible( + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(25), + boxShadow: [ + BoxShadow( + color: Colors.black38, + blurRadius: 4, + offset: const Offset(0, 4), + ), + ], + ), + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + child: DropdownButtonHideUnderline( + child: DropdownButton( + value: _selectedParentId, + icon: const SizedBox.shrink(), + dropdownColor: Colors.white, + isDense: false, + itemHeight: 80, // 높이 증가로 폰트 클리핑 방지 + borderRadius: BorderRadius.circular(20), + isExpanded: false, // 내용에 맞는 너비 + style: const TextStyle( + fontSize: 60, + fontWeight: FontWeight.w800, + color: AppColors.ongiOrange, + height: 1.1, // 줄 높이 조정으로 클리핑 방지 + ), + items: _parentMembers.map((parent) { + return DropdownMenuItem( + value: parent['uuid'], + child: Container( + alignment: Alignment.centerLeft, + child: Text( + _formatNameForDisplay(parent['name']), + style: const TextStyle( + fontSize: 60, + fontWeight: FontWeight.w800, + color: AppColors.ongiOrange, + height: 1.1, // 줄 높이 조정 + ), + overflow: TextOverflow.ellipsis, + ), ), - ), - ); - }).toList(), - onChanged: (String? newValue) { - if (newValue != null) { - _onParentSelected(newValue); - } - }, + ); + }).toList(), + onChanged: (String? newValue) { + if (newValue != null) { + _onParentSelected(newValue); + } + }, + ), ), ), ), + const SizedBox(width: 8), // 간격 추가 const Text( '님의', style: TextStyle( diff --git a/frontend/ongi/lib/screens/health/pill_history_screen.dart b/frontend/ongi/lib/screens/health/pill_history_screen.dart index d95a1ae..0c4440d 100644 --- a/frontend/ongi/lib/screens/health/pill_history_screen.dart +++ b/frontend/ongi/lib/screens/health/pill_history_screen.dart @@ -28,6 +28,9 @@ class _PillHistoryScreenState extends State { // 자녀 사용자 관련 상태 bool _isChild = false; String? _selectedParentId; + + // 약 복용 상태 관련 + int _todayPillCount = 0; @override void initState() { @@ -83,16 +86,41 @@ class _PillHistoryScreenState extends State { taken.add('$pillId|$hhmm'); } } + // 약 복용 카운트 계산 + int totalIntakes = 0; + int takenIntakes = 0; + + for (var pill in schedule) { + final List intakeTimes = pill['intakeTimes'] ?? []; + final Map dayIntakeStatus = pill['dayIntakeStatus'] ?? {}; + + totalIntakes += intakeTimes.length; + + // dayIntakeStatus에서 실제 복용한 시간들을 확인 + for (var intakeTime in intakeTimes) { + final timeKey = intakeTime.toString().substring(0, 5); // "08:00:00" -> "08:00" + if (dayIntakeStatus.containsKey(timeKey)) { + takenIntakes++; + } + } + } + + // 남은 복용 횟수 + int remainingIntakes = totalIntakes - takenIntakes; + if (remainingIntakes < 0) remainingIntakes = 0; + setState(() { _todaySchedule = schedule; _takenKeys ..clear() ..addAll(taken); + _todayPillCount = remainingIntakes; _isLoading = false; }); } catch (e) { setState(() { _todaySchedule = >[]; + _todayPillCount = 0; _isLoading = false; }); } @@ -122,6 +150,54 @@ class _PillHistoryScreenState extends State { } } + Widget _buildPillStatusText() { + if (_todayPillCount == 0) { + return const Column( + children: [ + Text( + '오늘의 약을', + style: TextStyle( + fontSize: 25, + color: Colors.white, + fontWeight: FontWeight.w600, + height: 1, + ), + ), + Text( + '모두 섭취하셨어요!', + style: TextStyle( + fontSize: 40, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + ], + ); + } else { + return Column( + children: [ + Text( + _isChild ? '오늘 ${_todayPillCount}개의 약을' : '오늘 복용해야 할 약,', + style: const TextStyle( + fontSize: 25, + color: Colors.white, + fontWeight: FontWeight.w600, + height: 1, + ), + ), + Text( + _isChild ? '섭취하지 않으셨어요!' : '다 섭취 하셨나요?', + style: const TextStyle( + fontSize: 40, + color: Colors.white, + fontWeight: FontWeight.w600, + ), + ), + ], + ); + } + } + Future _addRecord({ required String pillId, required String intakeTime, @@ -131,6 +207,7 @@ class _PillHistoryScreenState extends State { // 즉시 UI 업데이트 (서버 응답 전) setState(() { _takenKeys.add(key); + if (_todayPillCount > 0) _todayPillCount--; }); try { @@ -159,6 +236,7 @@ class _PillHistoryScreenState extends State { // 서버 요청 실패 시 UI 상태 롤백 setState(() { _takenKeys.remove(key); + _todayPillCount++; }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( @@ -186,6 +264,7 @@ class _PillHistoryScreenState extends State { // 즉시 UI 업데이트 (서버 응답 전) setState(() { _takenKeys.remove(key); + _todayPillCount++; }); try { @@ -214,6 +293,7 @@ class _PillHistoryScreenState extends State { // 서버 요청 실패 시 UI 상태 롤백 setState(() { _takenKeys.add(key); + if (_todayPillCount > 0) _todayPillCount--; }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( @@ -264,23 +344,7 @@ class _PillHistoryScreenState extends State { maxHeight: double.infinity, child: Column( children: [ - const Text( - '오늘 복용해야 할 약,', - style: TextStyle( - fontSize: 25, - color: Colors.white, - fontWeight: FontWeight.w600, - height: 1, - ), - ), - const Text( - '다 섭취 하셨나요?', - style: TextStyle( - fontSize: 40, - color: Colors.white, - fontWeight: FontWeight.w600, - ), - ), + _buildPillStatusText(), Image.asset( 'assets/images/pill_history_title_logo.png', width: circleSize * 0.26, @@ -314,17 +378,22 @@ class _PillHistoryScreenState extends State { itemBuilder: (context, index) { if (index == _todaySchedule.length) { return GestureDetector( - onTap: () { - Navigator.push( + onTap: () async { + final result = await Navigator.push( context, MaterialPageRoute( builder: (context) => AddPillScreen( targetParentId: _selectedParentId, ), ), - ).then((_) { + ); + + // 약 추가 성공 시 즉시 새로고침 + if (result == true) { + print('약 추가 성공 - 즉시 데이터 새로고침'); + // 즉시 새로고침 _fetchTodaySchedule(); - }); + } }, child: Container( margin: const EdgeInsets.symmetric( diff --git a/frontend/ongi/lib/screens/home/home_degree_graph.dart b/frontend/ongi/lib/screens/home/home_degree_graph.dart index bf3588f..0e7e288 100644 --- a/frontend/ongi/lib/screens/home/home_degree_graph.dart +++ b/frontend/ongi/lib/screens/home/home_degree_graph.dart @@ -97,8 +97,11 @@ class _HomeDegreeGraph extends State { } double get horizontalInterval { - if ((maxY - minY) == 0) return 0.1; - return (maxY - minY) / 9; + final range = maxY - minY; + if (range <= 0) return 0.1; + + // 10개 라벨이 나오도록 9개 간격으로 나누기 + return range / 9; } Future fetchAllTemperatureData() async { @@ -239,18 +242,27 @@ class _HomeDegreeGraph extends State { showTitles: true, interval: horizontalInterval, getTitlesWidget: (value, meta) { - if (value < minY || value > maxY) + // 범위 밖 값만 제외 + if (value < minY || value > maxY) { + return const SizedBox.shrink(); + } + + // 경계값에서 약간 안쪽으로만 필터링 + final smallMargin = horizontalInterval * 0.1; + if ((value - minY).abs() < smallMargin || (value - maxY).abs() < smallMargin) { return const SizedBox.shrink(); + } + return Text( value.toStringAsFixed(1), style: const TextStyle( color: Colors.grey, - fontSize: 13, + fontSize: 11, fontFamily: 'Pretendard', ), ); }, - reservedSize: 36, + reservedSize: 40, ), ), bottomTitles: AxisTitles( diff --git a/frontend/ongi/lib/screens/home/home_donutCapsule.dart b/frontend/ongi/lib/screens/home/home_donutCapsule.dart index 597ee84..b75b70c 100644 --- a/frontend/ongi/lib/screens/home/home_donutCapsule.dart +++ b/frontend/ongi/lib/screens/home/home_donutCapsule.dart @@ -7,6 +7,7 @@ import 'package:ongi/services/temperature_service.dart'; import 'package:ongi/services/health_service.dart'; import 'package:ongi/services/pill_service.dart'; import 'package:ongi/services/step_service.dart'; +import 'package:ongi/services/family_service.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; @@ -50,6 +51,7 @@ class _HomeCapsuleSectionState extends State { // 전체 데이터 새로고침 void refreshAllData() { + print('HomeCapsuleSection 전체 데이터 새로고침'); fetchTodayTemperature(); _buttonColumnKey.currentState?.refreshData(); if (widget.onRefresh != null) { @@ -57,6 +59,12 @@ class _HomeCapsuleSectionState extends State { } } + // 약물 데이터만 빠르게 새로고침 + void refreshPillDataOnly() { + print('HomeCapsuleSection 약물 데이터만 새로고침'); + _buttonColumnKey.currentState?.refreshPillDataOnly(); + } + Future fetchTodayTemperature() async { setState(() { isLoading = true; @@ -283,7 +291,7 @@ class ButtonColumn extends StatefulWidget { State createState() => _ButtonColumnState(); } -class _ButtonColumnState extends State { +class _ButtonColumnState extends State with WidgetsBindingObserver { int selectedIdx = -1; // 초기값을 -1로 (아무것도 선택되지 않은 상태) // API 데이터 상태 @@ -291,6 +299,10 @@ class _ButtonColumnState extends State { String painText = ''; String stepText = ''; bool isLoading = true; + + // 자녀 사용자 관련 상태 + bool _isChild = false; + List> _parentMembers = []; String _formatRemaining(Duration d) { if (d.inMinutes <= 0) return '곧'; @@ -305,7 +317,136 @@ class _ButtonColumnState extends State { @override void initState() { super.initState(); - _loadData(); + WidgetsBinding.instance.addObserver(this); + _checkUserType(); + } + + Future _checkUserType() async { + try { + final isParent = await PrefsManager.getIsParent(); + _isChild = !isParent; + + if (_isChild) { + await _loadParentMembers(); + } + + _loadData(); + } catch (e) { + print('사용자 타입 확인 실패: $e'); + _loadData(); // 오류 시 기본 동작 + } + } + + Future _loadParentMembers() async { + try { + final members = await FamilyService.getFamilyMembers(); + final parents = members.where((member) => member['isParent'] == true).toList(); + setState(() { + _parentMembers = parents; + }); + } catch (e) { + print('부모 멤버 로드 실패: $e'); + } + } + + Future _loadNearestParentPillInfo() async { + try { + final now = DateTime.now(); + final currentTime = TimeOfDay.fromDateTime(now); + + String? nearestParentName; + String? nearestPillName; + Duration? shortestDuration; + + for (final parent in _parentMembers) { + try { + final parentUuid = parent['uuid']; + final parentName = parent['name'] ?? '부모님'; + + if (parentUuid != null) { + final pillSchedule = await PillService.getTodayPillSchedule(parentUuid: parentUuid) + .timeout(const Duration(seconds: 5)); + + for (final pill in pillSchedule) { + final pillName = pill['name'] ?? '약물'; + final intakeTimes = pill['intakeTimes'] as List? ?? []; + + for (final timeStr in intakeTimes) { + try { + final timeParts = timeStr.toString().split(':'); + if (timeParts.length >= 2) { + final time = TimeOfDay( + hour: int.parse(timeParts[0]), + minute: int.parse(timeParts[1]), + ); + + // 현재 시간보다 늦은 시간인지 확인 + if (time.hour > currentTime.hour || + (time.hour == currentTime.hour && time.minute > currentTime.minute)) { + + final nextDateTime = DateTime( + now.year, + now.month, + now.day, + time.hour, + time.minute, + ); + final difference = nextDateTime.difference(now); + + // 가장 가까운 시간인지 확인 + if (shortestDuration == null || difference < shortestDuration) { + shortestDuration = difference; + nearestParentName = parentName; + nearestPillName = pillName; + } + } + } + } catch (timeParseError) { + print('시간 파싱 오류: $timeParseError, 시간: $timeStr'); + } + } + } + } + } catch (e) { + print('부모 ${parent['name']} 약물 데이터 로딩 오류: $e'); + } + } + + // 결과 설정 + if (nearestParentName != null && nearestPillName != null && shortestDuration != null) { + final remain = _formatRemaining(shortestDuration); + setState(() { + pillText = '$nearestParentName님은 $remain $nearestPillName을 먹어야 해요'; + }); + } else { + setState(() { + pillText = '부모님 약 복용 시간을 확인해봐요'; + }); + } + } catch (e) { + print('가장 가까운 부모 약물 정보 로딩 오류: $e'); + setState(() { + pillText = '부모님 약 복용 시간을 확인해봐요'; + }); + } + } + + @override + void dispose() { + WidgetsBinding.instance.removeObserver(this); + super.dispose(); + } + + @override + void didChangeAppLifecycleState(AppLifecycleState state) { + super.didChangeAppLifecycleState(state); + + // 앱이 다시 포그라운드로 돌아올 때 즉시 약물 데이터만 새로고침 + if (state == AppLifecycleState.resumed) { + print('앱이 다시 포그라운드로 돌아옴 - 약물 데이터 즉시 새로고침'); + // 약물 데이터만 빠르게 새로고침 + _loadPillData(); + } } Future _loadData() async { @@ -335,13 +476,42 @@ class _ButtonColumnState extends State { Future _loadPillData() async { try { print('약물 데이터 로딩 시작'); - final pillSchedule = await PillService.getTodayPillSchedule(); + + if (_isChild) { + // 자녀 화면: 가장 가까운 시간에 약을 복용해야 하는 부모 찾기 + await _loadNearestParentPillInfo(); + return; + } + + // 부모 화면: 기존 로직 유지 + final userInfo = await PrefsManager.getUserInfo(); + final parentUuid = userInfo['uuid']; + + if (parentUuid == null) { + print('사용자 UUID가 없습니다'); + setState(() { + pillText = '사용자 정보 없음'; + }); + return; + } + + print('사용자 UUID: $parentUuid'); + + final pillSchedule = await PillService.getTodayPillSchedule(parentUuid: parentUuid) + .timeout(const Duration(seconds: 5)); + print('약물 데이터 응답: $pillSchedule'); + print('약물 데이터 개수: ${pillSchedule.length}'); + if (pillSchedule.isNotEmpty) { - // 첫 번째 약물 정보 사용 + // 첫 번째 약물 정보 사용ㅅㄹ final pill = pillSchedule.first; final pillName = pill['name'] ?? '약물'; final intakeTimes = pill['intakeTimes'] as List? ?? []; + + print('약물 이름: $pillName'); + print('복용 시간들: $intakeTimes'); + print('복용 시간 타입: ${intakeTimes.runtimeType}'); if (intakeTimes.isNotEmpty) { // 다음 복용 시간 찾기 @@ -350,17 +520,25 @@ class _ButtonColumnState extends State { TimeOfDay? nextIntakeTime; for (final timeStr in intakeTimes) { - final time = TimeOfDay( - hour: int.parse(timeStr.split(':')[0]), - minute: int.parse(timeStr.split(':')[1]), - ); - - // 현재 시간보다 늦은 시간 찾기 - if (time.hour > currentTime.hour || - (time.hour == currentTime.hour && - time.minute > currentTime.minute)) { - nextIntakeTime = time; - break; + try { + // 시간 문자열 파싱 + final timeParts = timeStr.toString().split(':'); + if (timeParts.length >= 2) { + final time = TimeOfDay( + hour: int.parse(timeParts[0]), + minute: int.parse(timeParts[1]), + ); + + // 현재 시간보다 늦은 시간 찾기 + if (time.hour > currentTime.hour || + (time.hour == currentTime.hour && + time.minute > currentTime.minute)) { + nextIntakeTime = time; + break; + } + } + } catch (timeParseError) { + print('시간 파싱 오류: $timeParseError, 시간: $timeStr'); } } @@ -395,7 +573,7 @@ class _ButtonColumnState extends State { } catch (e) { print('약물 데이터 로딩 오류: $e'); setState(() { - pillText = '오늘의 복용 약'; // 기본값 + pillText = '약물 정보 로드 실패'; }); } } @@ -431,6 +609,50 @@ class _ButtonColumnState extends State { Future _loadPainData() async { try { print('통증 데이터 로딩 시작'); + + if (_isChild) { + // 자녀 화면: 부모들의 통증 기록 확인 + final today = DateTime.now(); + final todayStr = '${today.year}-${today.month.toString().padLeft(2, '0')}-${today.day.toString().padLeft(2, '0')}'; + + List painfulParents = []; + + for (final parent in _parentMembers) { + try { + final parentId = parent['uuid']; + if (parentId != null) { + final painRecords = await HealthService.fetchPainRecords(parentId); + final todayPainRecords = painRecords + .where((record) => record['date'] == todayStr) + .toList(); + + if (todayPainRecords.isNotEmpty) { + final parentName = parent['name'] ?? '부모님'; + final koreanAreas = todayPainRecords + .map((record) => _convertPainAreaToKorean(record['painArea'].toString())) + .toSet() + .join(', '); + painfulParents.add('$parentName님이 $koreanAreas가 아파요'); + } + } + } catch (e) { + print('부모 ${parent['name']} 통증 데이터 로딩 오류: $e'); + } + } + + if (painfulParents.isNotEmpty) { + setState(() { + painText = painfulParents.first; // 첫 번째 부모의 통증 정보만 표시 + }); + } else { + setState(() { + painText = '오늘은 아픈 곳이 없으시네요'; + }); + } + return; + } + + // 부모 화면: 기존 로직 유지 final userInfo = await PrefsManager.getUserInfo(); final userId = userInfo['uuid']; print('사용자 ID: $userId'); @@ -466,7 +688,7 @@ class _ButtonColumnState extends State { } catch (e) { print('통증 데이터 로딩 오류: $e'); setState(() { - painText = '오늘의 통증 부위'; // 기본값 + painText = _isChild ? '통증 정보 확인 중...' : '오늘의 통증 부위'; // 기본값 }); } } @@ -477,22 +699,32 @@ class _ButtonColumnState extends State { final totalSteps = await StepService.getTodayTotalSteps(); print('걸음 수 응답: $totalSteps'); setState(() { - stepText = - '${totalSteps.toString().replaceAllMapped(RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]},')} 걸음'; + if (_isChild) { + stepText = '오늘 ${totalSteps.toString().replaceAllMapped(RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]},')} 걸음 걸었어요'; + } else { + stepText = '${totalSteps.toString().replaceAllMapped(RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]},')} 걸음'; + } }); } catch (e) { print('걸음 수 데이터 로딩 오류: $e'); setState(() { - stepText = '오늘의 걸음'; // 기본값 + stepText = _isChild ? '내 걸음 수' : '오늘의 걸음'; // 기본값 }); } } // 외부에서 호출할 수 있는 새로고침 메서드 void refreshData() { + print('ButtonColumn 강제 새로고침 호출됨'); _loadData(); } + // 약물 데이터만 빠르게 새로고침 + void refreshPillDataOnly() { + print('약물 데이터만 빠르게 새로고침'); + _loadPillData(); + } + @override Widget build(BuildContext context) { return SizedBox( diff --git a/frontend/ongi/lib/screens/photo/detail_record_screen.dart b/frontend/ongi/lib/screens/photo/detail_record_screen.dart index ff755c4..94e53dc 100644 --- a/frontend/ongi/lib/screens/photo/detail_record_screen.dart +++ b/frontend/ongi/lib/screens/photo/detail_record_screen.dart @@ -6,6 +6,7 @@ import 'package:ongi/models/maumlog.dart'; import 'package:ongi/utils/prefs_manager.dart'; import 'package:ongi/screens/photo/photo_remind_popup.dart'; import 'package:ongi/screens/photo/photo_update_popup.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import '../../services/maum_log_service.dart'; @@ -86,36 +87,19 @@ class _DetailRecordScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ const SizedBox(height: 10), - // 상단 아이콘들 + // 뒤로가기 Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), + padding: const EdgeInsets.symmetric(horizontal: 20), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - IconButton( - icon: const Icon( - Icons.arrow_back_ios_new_rounded, - color: Colors.black87, + GestureDetector( + onTap: () => Navigator.of(context).pop(), + child: SizedBox( + width: 36, + height: 36, + child: SvgPicture.asset('assets/images/back_icon_black.svg'), ), - onPressed: () => Navigator.of(context).pop(), - ), - Row( - children: [ - IconButton( - icon: const Icon( - Icons.share_outlined, - color: Colors.black54, - ), - onPressed: () {}, - ), - IconButton( - icon: const Icon( - Icons.more_vert, - color: Colors.black54, - ), - onPressed: () {}, - ), - ], ), ], ),