Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/ongi/assets/images/close_icon_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions frontend/ongi/assets/images/logo_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions frontend/ongi/lib/core/app_orange_background.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:flutter/material.dart';
import 'package:ongi/core/app_colors.dart';
import 'package:flutter_svg/svg.dart';

class AppOrangeBackground extends StatelessWidget {
final Widget child;
const AppOrangeBackground({super.key, required this.child});

@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(color: AppColors.ongiOrange),
Positioned(
left: -45,
bottom: 80,
child: SvgPicture.asset(
'assets/images/logo_white.svg',
width: 380,
fit: BoxFit.contain,
),
),
Positioned.fill(child: child),
],
);
}
}
45 changes: 32 additions & 13 deletions frontend/ongi/lib/screens/health/add_pill_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:ongi/core/app_colors.dart';
import 'package:ongi/widgets/custom_drop_down.dart';
import 'package:ongi/screens/health/pill_update_popup.dart';

class AddPillScreen extends StatefulWidget {
const AddPillScreen({super.key});
Expand All @@ -14,12 +15,7 @@ class _AddPillScreenState extends State<AddPillScreen> {
Set<String> selectedDays = <String>{};
final List<String> days = ['일', '월', '화', '수', '목', '금', '토'];
String selectedFrequency = '하루 세 번';
final List<String> frequencies = [
'하루 한 번',
'하루 두 번',
'하루 세 번',
'하루 네 번',
];
final List<String> frequencies = ['하루 한 번', '하루 두 번', '하루 세 번', '하루 네 번'];
String selectedTime = '08:00';
final List<String> times = [
'00:00',
Expand Down Expand Up @@ -96,7 +92,11 @@ class _AddPillScreenState extends State<AddPillScreen> {
children: [
const SizedBox(height: 150),
Padding(
padding: const EdgeInsets.only(left: 40, right: 40, top: 10),
padding: const EdgeInsets.only(
left: 40,
right: 40,
top: 10,
),
child: TextField(
//controller: _passwordCtrl,
keyboardType: TextInputType.visiblePassword,
Expand Down Expand Up @@ -155,7 +155,9 @@ class _AddPillScreenState extends State<AddPillScreen> {
final isSelected = selectedDays.contains(day);
final isLastItem = index == days.length - 1;
return Padding(
padding: EdgeInsets.only(right: isLastItem ? 40 : 12),
padding: EdgeInsets.only(
right: isLastItem ? 40 : 12,
),
child: GestureDetector(
onTap: () {
setState(() {
Expand Down Expand Up @@ -239,9 +241,12 @@ class _AddPillScreenState extends State<AddPillScreen> {
itemCount: selectedTimes.length,
itemBuilder: (context, index) {
final time = selectedTimes[index];
final isLastItem = index == selectedTimes.length - 1;
final isLastItem =
index == selectedTimes.length - 1;
return Padding(
padding: EdgeInsets.only(right: isLastItem ? 40 : 12),
padding: EdgeInsets.only(
right: isLastItem ? 40 : 12,
),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 16,
Expand Down Expand Up @@ -308,14 +313,25 @@ class _AddPillScreenState extends State<AddPillScreen> {
),
),
Container(
padding: const EdgeInsets.only(left: 20, right: 20, bottom: 40, top: 20),
padding: const EdgeInsets.only(
left: 20,
right: 20,
bottom: 40,
top: 20,
),
child: SizedBox(
width: double.infinity,
height: 72,
child: ElevatedButton(
onPressed: () {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => PillUpdatePopup(),
),
);
print('약 정보 등록');
Navigator.of(context).pop();
// Navigator.of(context).pop();
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.ongiOrange,
Expand All @@ -341,7 +357,10 @@ class _AddPillScreenState extends State<AddPillScreen> {
top: 80,
right: 30,
child: IconButton(
icon: SvgPicture.asset('assets/images/close_icon_black.svg', width: 28),
icon: SvgPicture.asset(
'assets/images/close_icon_black.svg',
width: 28,
),
onPressed: () {
Navigator.of(context).pop();
},
Expand Down
89 changes: 89 additions & 0 deletions frontend/ongi/lib/screens/health/pill_update_popup.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
import 'package:flutter/material.dart';
import 'package:ongi/core/app_orange_background.dart';
import 'package:ongi/core/app_colors.dart';
import 'package:flutter_svg/svg.dart';

class PillUpdatePopup extends StatelessWidget {
const PillUpdatePopup({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: AppOrangeBackground(
child: Stack(
children: [
Positioned(
top: 80,
right: 30,
child: IconButton(
icon: SvgPicture.asset(
'assets/images/close_icon_white.svg',
width: 28,
),
onPressed: () {
Navigator.of(context).pop();
},
iconSize: 36,
),
),
Padding(
padding: const EdgeInsets.only(left: 30, top: 160, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'새로운 약\n복용 일정이',
style: TextStyle(
fontSize: 60,
fontWeight: FontWeight.w200,
height: 1.2,
color: Colors.white,
),
),
const Text(
'추가되었어요!',
style: TextStyle(
fontSize: 60,
fontWeight: FontWeight.w800,
height: 1.2,
color: Colors.white,
),
),
Padding(
padding: const EdgeInsets.only(
left: 10,
top: 180,
right: 10,
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 8),
minimumSize: const Size(double.infinity, 35),
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
),
onPressed: () {
Navigator.of(context).pop();
},
child: const Text(
'확인하기!',
style: TextStyle(
fontSize: 33,
fontWeight: FontWeight.w400,
color: AppColors.ongiOrange,
),
),
),
),
],
),
),
],
),
),
);
}
}
103 changes: 103 additions & 0 deletions frontend/ongi/lib/screens/photo/photo_remind_popup.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import 'package:flutter/material.dart';
import 'package:ongi/core/app_orange_background.dart';
import 'package:ongi/core/app_colors.dart';
import 'package:flutter_svg/svg.dart';

class PhotoRemindPopup extends StatelessWidget {
const PhotoRemindPopup({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: AppOrangeBackground(
child: Stack(
children: [
Positioned(
top: 80,
right: 30,
child: IconButton(
icon: SvgPicture.asset(
'assets/images/close_icon_white.svg',
width: 28,
),
onPressed: () {
Navigator.of(context).pop();
},
iconSize: 36,
),
),
Padding(
padding: const EdgeInsets.only(left: 30, top: 160, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'가족들이',
style: TextStyle(
fontSize: 60,
fontWeight: FontWeight.w200,
height: 1.2,
color: Colors.white,
),
),
const Text(
'사진을\n올리지\n않았어요!',
style: TextStyle(
fontSize: 60,
fontWeight: FontWeight.w800,
height: 1.2,
color: Colors.white,
),
),
Padding(
padding: const EdgeInsets.only(
left: 10,
top: 170,
right: 10,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'가족들에게 푸시 알림을 전송할까요?',
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w300,
color: Colors.white,
),
),
const SizedBox(height: 12),
ElevatedButton(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 8),
minimumSize: const Size(double.infinity, 35),
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
),
onPressed: () {
Navigator.of(context).pop(); // 마음 기록 입력 화면 완성하고 수정
},
child: const Text(
'재촉하기!',
style: TextStyle(
fontSize: 33,
fontWeight: FontWeight.w400,
color: AppColors.ongiOrange,
),
),
),
],
),
),
],
),
),
],
),
),
);
}
}
Loading
Loading