Skip to content

Commit c727ed5

Browse files
authored
feat: 운동 기록 화면 틀 완성 (Neibce/OnGi#50)
1 parent 5b5e14e commit c727ed5

File tree

4 files changed

+95
-32
lines changed

4 files changed

+95
-32
lines changed
216 KB
Loading
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import 'package:flutter/material.dart';
2+
import '../../core/app_colors.dart';
3+
4+
class ExerciseRecordScreen extends StatefulWidget {
5+
const ExerciseRecordScreen({super.key});
6+
7+
@override
8+
State<ExerciseRecordScreen> createState() => _ExerciseRecordScreenState();
9+
}
10+
11+
class _ExerciseRecordScreenState extends State<ExerciseRecordScreen> {
12+
@override
13+
Widget build(BuildContext context) {
14+
final screenWidth = MediaQuery.of(context).size.width;
15+
final circleSize = screenWidth * 1.56;
16+
17+
return Scaffold(
18+
backgroundColor: AppColors.ongiLigntgrey,
19+
body: SafeArea(
20+
child: Stack(
21+
clipBehavior: Clip.none,
22+
children: [
23+
Align(
24+
alignment: Alignment.topCenter,
25+
child: Transform.translate(
26+
offset: Offset(0, -circleSize * 0.76),
27+
child: OverflowBox(
28+
maxWidth: double.infinity,
29+
maxHeight: double.infinity,
30+
child: Container(
31+
width: circleSize,
32+
height: circleSize,
33+
decoration: BoxDecoration(
34+
shape: BoxShape.circle,
35+
color: AppColors.ongiOrange,
36+
),
37+
child: Center(
38+
child: Padding(
39+
padding: EdgeInsets.only(top: circleSize),
40+
child: OverflowBox(
41+
maxHeight: double.infinity,
42+
child: Column(
43+
children: [
44+
const Text(
45+
'오늘 목표 운동 시간,',
46+
style: TextStyle(
47+
fontSize: 25,
48+
color: Colors.white,
49+
fontWeight: FontWeight.w600,
50+
height: 1,
51+
),
52+
),
53+
const Text(
54+
'다 채우셨나요?',
55+
style: TextStyle(
56+
fontSize: 40,
57+
color: Colors.white,
58+
fontWeight: FontWeight.w600,
59+
),
60+
),
61+
Container(
62+
margin: EdgeInsets.symmetric(
63+
horizontal: 0,
64+
vertical: 6,
65+
),
66+
child: Image.asset(
67+
'assets/images/exercise_record_title_logo.png',
68+
width: circleSize * 0.3,
69+
),
70+
),
71+
],
72+
),
73+
),
74+
),
75+
),
76+
),
77+
),
78+
),
79+
),
80+
Positioned(
81+
top: circleSize * 0.3 + 60,
82+
left: 0,
83+
right: 0,
84+
bottom: 0,
85+
child: Text("여기부터 본문을 생성 ㅇ.ㅇ"),
86+
),
87+
],
88+
),
89+
),
90+
);
91+
}
92+
}

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

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:ongi/core/app_light_background.dart';
3+
import 'package:ongi/screens/health/exercise_record_screen.dart';
34
import 'package:ongi/utils/prefs_manager.dart';
45
import 'package:ongi/core/app_colors.dart';
56
import 'package:ongi/screens/health/family_step_tracker_screen.dart';
@@ -100,38 +101,7 @@ class _HealthHomeScreenState extends State<HealthHomeScreen> {
100101
Widget _buildExerciseView() {
101102
return Stack(
102103
children: [
103-
Container(
104-
color: AppColors.ongiLigntgrey,
105-
child: Center(
106-
child: Column(
107-
mainAxisAlignment: MainAxisAlignment.center,
108-
children: [
109-
const Text(
110-
'운동 기록',
111-
style: TextStyle(
112-
fontSize: 40,
113-
fontWeight: FontWeight.w600,
114-
color: AppColors.ongiOrange,
115-
),
116-
),
117-
const SizedBox(height: 50),
118-
Container(
119-
padding: const EdgeInsets.all(20),
120-
margin: const EdgeInsets.all(20),
121-
decoration: BoxDecoration(
122-
color: Colors.white,
123-
borderRadius: BorderRadius.circular(20),
124-
),
125-
child: const Text(
126-
'운동 기록 화면\n(추후 구현 예정)',
127-
textAlign: TextAlign.center,
128-
style: TextStyle(fontSize: 18),
129-
),
130-
),
131-
],
132-
),
133-
),
134-
),
104+
const ExerciseRecordScreen(),
135105
_buildBackButton(),
136106
],
137107
);

frontend/ongi/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ flutter:
4646
- assets/images/homebar_capsule.svg
4747
- assets/images/homebar_med.svg
4848
- assets/images/homebar_walk.svg
49+
- assets/images/exercise_record_title_logo.png
4950
- assets/images/walk_icon.svg
5051
- assets/images/users/elderly_woman.png
5152

0 commit comments

Comments
 (0)