Skip to content

Commit 8b6d9c4

Browse files
authored
feat: 마음 기록 상세 화면에 뒤로가기 버튼 추가 (Neibce/OnGi#63)
* feat: 마음 기록 상세 화면에 뒤로가기 버튼 추가
1 parent 828a541 commit 8b6d9c4

File tree

3 files changed

+71
-66
lines changed

3 files changed

+71
-66
lines changed

frontend/ongi/lib/screens/health/health_home_screen.dart

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -70,49 +70,29 @@ class _HealthHomeScreenState extends State<HealthHomeScreen> {
7070
child: Container(
7171
width: 44,
7272
height: 44,
73-
child: Icon(
74-
Icons.arrow_back_ios,
75-
color: Colors.white,
76-
size: 30,
77-
),
73+
child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 30),
7874
),
7975
),
8076
);
8177
}
8278

8379
Widget _buildPainInputView() {
8480
return Stack(
85-
children: [
86-
const HealthStatusInputScreen(),
87-
_buildBackButton(),
88-
],
81+
children: [const HealthStatusInputScreen(), _buildBackButton()],
8982
);
9083
}
9184

9285
Widget _buildPillHistoryView() {
93-
return Stack(
94-
children: [
95-
const PillHistoryScreen(),
96-
_buildBackButton(),
97-
],
98-
);
86+
return Stack(children: [const PillHistoryScreen(), _buildBackButton()]);
9987
}
10088

10189
Widget _buildExerciseView() {
102-
return Stack(
103-
children: [
104-
const ExerciseRecordScreen(),
105-
_buildBackButton(),
106-
],
107-
);
90+
return Stack(children: [const ExerciseRecordScreen(), _buildBackButton()]);
10891
}
10992

11093
Widget _buildStepTrackerView() {
11194
return Stack(
112-
children: [
113-
const FamilyStepTrackerScreen(),
114-
_buildBackButton(),
115-
],
95+
children: [const FamilyStepTrackerScreen(), _buildBackButton()],
11696
);
11797
}
11898

@@ -122,7 +102,7 @@ class _HealthHomeScreenState extends State<HealthHomeScreen> {
122102
child: Column(
123103
crossAxisAlignment: CrossAxisAlignment.start,
124104
children: [
125-
const SizedBox(height: 150),
105+
const SizedBox(height: 130),
126106
Padding(
127107
padding: const EdgeInsets.symmetric(horizontal: 40),
128108
child: Column(
@@ -208,7 +188,7 @@ class _HealthHomeScreenState extends State<HealthHomeScreen> {
208188
),
209189
),
210190
Positioned(
211-
left: 165,
191+
left: 160,
212192
top: 40,
213193
child: Image.asset(
214194
'assets/images/sitting_mom_icon.png',
@@ -444,9 +424,7 @@ class _HealthHomeScreenState extends State<HealthHomeScreen> {
444424
Widget build(BuildContext context) {
445425
return Scaffold(
446426
backgroundColor: Colors.transparent,
447-
body: AppLightBackground(
448-
child: _buildCurrentView(),
449-
),
427+
body: AppLightBackground(child: _buildCurrentView()),
450428
);
451429
}
452430
}

frontend/ongi/lib/screens/photo/photo_calendar_screen.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class _PhotoCalendarScreenState extends State<PhotoCalendarScreen> {
140140
child: Column(
141141
crossAxisAlignment: CrossAxisAlignment.start,
142142
children: [
143-
const SizedBox(height: 150),
143+
const SizedBox(height: 130),
144144
Padding(
145145
padding: const EdgeInsets.symmetric(horizontal: 40),
146146
child: Column(
@@ -209,7 +209,7 @@ class _PhotoCalendarScreenState extends State<PhotoCalendarScreen> {
209209
} else {
210210
_selectedDate = selectedDay;
211211
_focusedDay = selectedDay;
212-
_currentView = 'photoDate'; // 날짜 선택 시 photo_date_screen으로 이동
212+
_currentView = 'photoDate';
213213
}
214214
});
215215
},
@@ -263,7 +263,7 @@ class _PhotoCalendarScreenState extends State<PhotoCalendarScreen> {
263263
height: 44,
264264
child: Icon(
265265
Icons.arrow_back_ios,
266-
color: Colors.white,
266+
color: AppColors.ongiOrange,
267267
size: 30,
268268
),
269269
),

frontend/ongi/lib/screens/photo/photo_date_screen.dart

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
4949
child: Column(
5050
crossAxisAlignment: CrossAxisAlignment.start,
5151
children: [
52-
const SizedBox(height: 125),
52+
const SizedBox(height: 130),
5353
Expanded(
5454
child: Padding(
5555
padding: const EdgeInsets.symmetric(horizontal: 40),
@@ -75,16 +75,20 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
7575
color: AppColors.ongiOrange,
7676
),
7777
),
78-
const SizedBox(height: 32),
78+
const SizedBox(height: 45),
7979
// 사진 카드 PageView
8080
Center(
8181
child: SizedBox(
8282
width: cardWidth,
8383
height: cardHeight,
8484
child: PageView.builder(
8585
itemCount: _photos.length,
86-
controller: PageController(viewportFraction: 0.78, initialPage: _currentPage),
87-
onPageChanged: (idx) => setState(() => _currentPage = idx),
86+
controller: PageController(
87+
viewportFraction: 0.78,
88+
initialPage: _currentPage,
89+
),
90+
onPageChanged: (idx) =>
91+
setState(() => _currentPage = idx),
8892
itemBuilder: (context, idx) {
8993
final photo = _photos[idx];
9094
final isActive = idx == _currentPage;
@@ -109,7 +113,10 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
109113
fit: BoxFit.cover,
110114
)
111115
: ImageFiltered(
112-
imageFilter: ImageFilter.blur(sigmaX: 8, sigmaY: 8),
116+
imageFilter: ImageFilter.blur(
117+
sigmaX: 8,
118+
sigmaY: 8,
119+
),
113120
child: Opacity(
114121
opacity: 0.7,
115122
child: Image.asset(
@@ -129,7 +136,10 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
129136
width: 88,
130137
height: 100,
131138
decoration: BoxDecoration(
132-
border: Border.all(color: AppColors.ongiOrange, width: 3),
139+
border: Border.all(
140+
color: AppColors.ongiOrange,
141+
width: 3,
142+
),
133143
borderRadius: BorderRadius.circular(15),
134144
),
135145
child: ClipRRect(
@@ -147,7 +157,12 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
147157
right: 0,
148158
bottom: 0,
149159
child: Container(
150-
padding: const EdgeInsets.fromLTRB(20, 16, 20, 24),
160+
padding: const EdgeInsets.fromLTRB(
161+
20,
162+
16,
163+
20,
164+
24,
165+
),
151166
decoration: BoxDecoration(
152167
borderRadius: const BorderRadius.only(
153168
bottomLeft: Radius.circular(32),
@@ -163,15 +178,18 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
163178
),
164179
),
165180
child: Column(
166-
crossAxisAlignment: CrossAxisAlignment.start,
181+
crossAxisAlignment:
182+
CrossAxisAlignment.start,
167183
mainAxisSize: MainAxisSize.min,
168184
children: [
169185
Row(
170186
children: [
171187
// 원형 프로필
172188
CircleAvatar(
173189
radius: 16,
174-
backgroundImage: AssetImage(photo['profile']!),
190+
backgroundImage: AssetImage(
191+
photo['profile']!,
192+
),
175193
),
176194
const SizedBox(width: 8),
177195
Expanded(
@@ -198,30 +216,41 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
198216
// 위치 버튼 스타일
199217
Align(
200218
alignment: Alignment.center,
201-
child: Container(
202-
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
203-
decoration: BoxDecoration(
204-
color: Colors.white,
205-
borderRadius: BorderRadius.circular(20),
206-
),
207-
child: Row(
208-
mainAxisSize: MainAxisSize.min,
209-
children: [
210-
Icon(Icons.place, color: AppColors.ongiOrange, size: 16),
211-
const SizedBox(width: 4),
212-
Text(
213-
photo['location']!,
214-
style: TextStyle(
219+
child: Container(
220+
padding:
221+
const EdgeInsets.symmetric(
222+
horizontal: 8,
223+
vertical: 2,
224+
),
225+
decoration: BoxDecoration(
226+
color: Colors.white,
227+
borderRadius:
228+
BorderRadius.circular(20),
229+
),
230+
child: Row(
231+
mainAxisSize: MainAxisSize.min,
232+
children: [
233+
Icon(
234+
Icons.place,
215235
color: AppColors.ongiOrange,
216-
fontSize: 11,
217-
fontWeight: FontWeight.w500,
218-
fontFamily: 'Pretendard',
236+
size: 16,
219237
),
220-
),
221-
],
238+
const SizedBox(width: 4),
239+
Text(
240+
photo['location']!,
241+
style: TextStyle(
242+
color:
243+
AppColors.ongiOrange,
244+
fontSize: 11,
245+
fontWeight:
246+
FontWeight.w500,
247+
fontFamily: 'Pretendard',
248+
),
249+
),
250+
],
251+
),
222252
),
223253
),
224-
),
225254
],
226255
),
227256
),
@@ -252,7 +281,7 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
252281
for (int i = 0; i < _photos.length; i++) ...[
253282
_buildIndicator(i == _currentPage),
254283
if (i != _photos.length - 1) const SizedBox(width: 6),
255-
]
284+
],
256285
],
257286
),
258287
],
@@ -270,9 +299,7 @@ class _PhotoDateScreenState extends State<PhotoDateScreen> {
270299
onPressed: () {},
271300
style: OutlinedButton.styleFrom(
272301
side: BorderSide(color: color, width: 1.5),
273-
shape: RoundedRectangleBorder(
274-
borderRadius: BorderRadius.circular(20),
275-
),
302+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
276303
backgroundColor: AppColors.ongiOrange,
277304
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 15),
278305
minimumSize: Size.zero,

0 commit comments

Comments
 (0)