From e1e3f35d4c093cab961e31bfa6303538c351d66a Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 16:38:40 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20app=20bar=EC=97=90=20=EC=A0=90=20?= =?UTF-8?q?=EC=84=B8=EA=B0=9C=20=EB=A9=94=EB=89=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/profile/profile_detail_screen.dart | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/lib/features/home/profile/profile_detail_screen.dart b/lib/features/home/profile/profile_detail_screen.dart index 0bf996d..dd3fca2 100644 --- a/lib/features/home/profile/profile_detail_screen.dart +++ b/lib/features/home/profile/profile_detail_screen.dart @@ -1,9 +1,11 @@ import 'package:cogo/common/widgets/atoms/texts/styles.dart'; import 'package:cogo/common/widgets/components/basic_button.dart'; import 'package:cogo/constants/colors.dart'; +import 'package:cogo/constants/paths.dart'; import 'package:cogo/features/home/profile/profile_detail_view_model.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; class ProfileDetailScreen extends StatelessWidget { @@ -28,6 +30,22 @@ class ProfileDetailScreen extends StatelessWidget { icon: SvgPicture.asset('assets/icons/button/chevron_left.svg'), onPressed: () => Navigator.of(context).pop(), ), + actions: [ + IconButton( + onPressed: () { + showModalBottomSheet( + context: context, + shape: const RoundedRectangleBorder( + borderRadius: + BorderRadius.vertical(top: Radius.circular(16)), + ), + builder: (BuildContext context) { + return _buildBottomSheetContent(context); + }, + ); + }, + icon: const Icon(Icons.more_vert)) + ], title: Consumer( builder: (context, viewModel, child) { if (viewModel.isLoading) { @@ -175,4 +193,26 @@ class ProfileDetailScreen extends StatelessWidget { ), ); } + + Widget _buildBottomSheetContent(BuildContext context) { + return Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ListTile( + leading: const Icon(Icons.report), + title: const Text( + '신고하기', + style: CogoTextStyle.body16, + ), + onTap: () { + context.push(Paths.report); + // 설정 메뉴 선택 + }, + ), + ], + ), + ); + } } From d521ed97e758c631725325d12b16e4bc6db7282e Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 16:38:49 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=EC=8B=A0=EA=B3=A0=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/paths.dart | 2 ++ lib/features/home/report/report_screen.dart | 19 +++++++++++++++++++ .../home/report/report_view_model.dart | 3 +++ lib/route/routes.dart | 8 ++++++++ 4 files changed, 32 insertions(+) create mode 100644 lib/features/home/report/report_screen.dart create mode 100644 lib/features/home/report/report_view_model.dart diff --git a/lib/constants/paths.dart b/lib/constants/paths.dart index 4d29b92..0bb4bd8 100644 --- a/lib/constants/paths.dart +++ b/lib/constants/paths.dart @@ -35,4 +35,6 @@ abstract class Paths { static const String myMentorIntroduce = '/my_mentor_introduce'; static const String timeSetting = '/time_setting'; static const String timeChecking = '/time_checking'; + + static const String report = '/report'; } diff --git a/lib/features/home/report/report_screen.dart b/lib/features/home/report/report_screen.dart new file mode 100644 index 0000000..0e2f62a --- /dev/null +++ b/lib/features/home/report/report_screen.dart @@ -0,0 +1,19 @@ +import 'package:cogo/features/home/report/report_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +class ReportScreen extends StatelessWidget { + const ReportScreen({super.key}); + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (context) => ReportViewModel(), + child: Scaffold( + appBar: AppBar( + title: const Text("신고하기"), + ), + ), + ); + } +} diff --git a/lib/features/home/report/report_view_model.dart b/lib/features/home/report/report_view_model.dart new file mode 100644 index 0000000..94f8071 --- /dev/null +++ b/lib/features/home/report/report_view_model.dart @@ -0,0 +1,3 @@ +import 'package:flutter/cupertino.dart'; + +class ReportViewModel extends ChangeNotifier {} diff --git a/lib/route/routes.dart b/lib/route/routes.dart index 449354e..2d40bb3 100644 --- a/lib/route/routes.dart +++ b/lib/route/routes.dart @@ -22,6 +22,7 @@ import 'package:cogo/features/home/mentor_detail/views/mentor_introduction_scree import 'package:cogo/features/home/mentor_detail/views/mentor_question1_screen.dart'; import 'package:cogo/features/home/mentor_detail/views/mentor_question2_screen.dart'; import 'package:cogo/features/home/profile/profile_detail_screen.dart'; +import 'package:cogo/features/home/report/report_screen.dart'; import 'package:cogo/features/home/search/search_screen.dart'; import 'package:cogo/features/mypage/mentor_introduce/my_mentor_introduce_screen.dart'; import 'package:cogo/features/mypage/mentor_time_checking/mentor_time_checking_screen.dart'; @@ -242,6 +243,13 @@ final AppRouter = GoRouter( child: const MentorTimeCheckingScreen(), ), ), + GoRoute( + path: Paths.report, + pageBuilder: (context, state) => MaterialPage( + key: state.pageKey, + child: const ReportScreen(), + ), + ), StatefulShellRoute.indexedStack( builder: (context, state, navigationShell) { return ScaffoldWithNestedNavigation( From 72d07a94fdc0eb902138707d4303dc95a8fa801f Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 17:18:07 +0900 Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=EC=8B=A0=EA=B3=A0=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EB=B7=B0=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/constants/paths.dart | 1 + .../home/report/report_detail_screen.dart | 89 +++++++++++++++++++ lib/features/home/report/report_screen.dart | 69 +++++++++++++- .../home/report/report_view_model.dart | 16 +++- lib/route/routes.dart | 8 ++ 5 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 lib/features/home/report/report_detail_screen.dart diff --git a/lib/constants/paths.dart b/lib/constants/paths.dart index 0bb4bd8..baf9667 100644 --- a/lib/constants/paths.dart +++ b/lib/constants/paths.dart @@ -37,4 +37,5 @@ abstract class Paths { static const String timeChecking = '/time_checking'; static const String report = '/report'; + static const String reportDetail = '/report_detail'; } diff --git a/lib/features/home/report/report_detail_screen.dart b/lib/features/home/report/report_detail_screen.dart new file mode 100644 index 0000000..e20a949 --- /dev/null +++ b/lib/features/home/report/report_detail_screen.dart @@ -0,0 +1,89 @@ +import 'package:cogo/common/widgets/atoms/texts/styles.dart'; +import 'package:cogo/common/widgets/components/basic_button.dart'; +import 'package:cogo/common/widgets/components/basic_textfield.dart'; +import 'package:cogo/common/widgets/components/secondary_button.dart'; +import 'package:cogo/constants/colors.dart'; +import 'package:cogo/features/home/report/report_view_model.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:provider/provider.dart'; + +class ReportDetailScreen extends StatelessWidget { + const ReportDetailScreen({super.key}); + + @override + Widget build(BuildContext context) { + return ChangeNotifierProvider( + create: (context) => ReportViewModel(), + child: Scaffold( + backgroundColor: CogoColor.white50, + resizeToAvoidBottomInset: true, + appBar: AppBar( + backgroundColor: CogoColor.white50, + title: const Text( + "신고하기", + style: CogoTextStyle.body20, + ), + centerTitle: true, + leading: IconButton( + icon: SvgPicture.asset('assets/icons/button/chevron_left.svg'), + onPressed: () => Navigator.of(context).pop(), + ), + ), + body: SingleChildScrollView( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Consumer( + builder: (context, viewModel, child) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + "신고 세부 내용", + style: CogoTextStyle.body16, + ), + const SizedBox(height: 10), + BasicTextField( + controller: viewModel.reportController, + hintText: '신고하실 내용을 자세히 작성해주세요', + currentCount: viewModel.reportCharCount, + maxCount: 200, + size: BasicTextFieldSize.LARGE, + maxLines: 1, + ), + const SizedBox(height: 10), + const Text('유의사항', style: CogoTextStyle.bodySB14), + const SizedBox(height: 10), + const Text( + '신고 후 신고 내역에 따라 해당 유저에게 안내가 이루어질 예정입니다.\n각 항목 별 세부 사항은 다음과 같습니다.\n\n' + '멘토링의 목적이 아닌것\n- 종교단체\n - 사업목적 (보험, 광고, etc)\n- 기타 멘토링으로 의도되지 않는 모든 행위\n\n' + '멘토링 과정에서 비매너 행위 발생\n- 잘못된 정보 제공\n- 상대방에 부적절한 언행\n- 기타 양자간 분쟁 가능성이 있는 비매너 행위', + style: CogoTextStyle.body9, + ), + const SizedBox(height: 30), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SecondaryButton( + text: '취소', + onPressed: () => Navigator.of(context).pop(), + ), + const SizedBox(width: 16), // 버튼들 사이에 16만큼 간격을 추가 + BasicButton( + text: '신고', + isClickable: true, + onPressed: viewModel.postReport, + ) + ], + ) + ], + ); + }), + ), + ), + ), + ), + ); + } +} diff --git a/lib/features/home/report/report_screen.dart b/lib/features/home/report/report_screen.dart index 0e2f62a..4d277fa 100644 --- a/lib/features/home/report/report_screen.dart +++ b/lib/features/home/report/report_screen.dart @@ -1,5 +1,10 @@ +import 'package:cogo/common/widgets/atoms/texts/styles.dart'; +import 'package:cogo/constants/colors.dart'; +import 'package:cogo/constants/paths.dart'; import 'package:cogo/features/home/report/report_view_model.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; class ReportScreen extends StatelessWidget { @@ -10,8 +15,70 @@ class ReportScreen extends StatelessWidget { return ChangeNotifierProvider( create: (context) => ReportViewModel(), child: Scaffold( + backgroundColor: CogoColor.white50, + resizeToAvoidBottomInset: true, appBar: AppBar( - title: const Text("신고하기"), + backgroundColor: CogoColor.white50, + title: const Text( + "신고하기", + style: CogoTextStyle.body20, + ), + centerTitle: true, + leading: IconButton( + icon: SvgPicture.asset('assets/icons/button/chevron_left.svg'), + onPressed: () => Navigator.of(context).pop(), + ), + ), + body: SingleChildScrollView( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Consumer( + builder: (context, viewModel, child) { + return Column( + children: [ + ListTile( + title: const Text( + '멘토링의 목적을 가지고 멘토가 만난것 같지 않아요', + style: CogoTextStyle.body16, + ), + trailing: const Icon(Icons.chevron_right), + onTap: () { + context.push(Paths.reportDetail); + }, + ), + ListTile( + title: const Text( + '멘토링 중에 분쟁 발생했어요', + style: CogoTextStyle.body16, + ), + trailing: const Icon(Icons.chevron_right), + onTap: () { + context.push(Paths.reportDetail); + }, + ), + ListTile( + title: const Text( + '멘토의 소속이나, 인적사항이 거짓인것 같아요', + style: CogoTextStyle.body16, + ), + trailing: const Icon(Icons.chevron_right), + onTap: () { + context.push(Paths.reportDetail); + }, + ), + ListTile( + title: const Text('기타 부적절한 행위가 있었어요', + style: CogoTextStyle.body16), + trailing: const Icon(Icons.chevron_right), + onTap: () { + context.push(Paths.reportDetail); + }), + ], + ); + }), + ), + ), ), ), ); diff --git a/lib/features/home/report/report_view_model.dart b/lib/features/home/report/report_view_model.dart index 94f8071..2dd71ef 100644 --- a/lib/features/home/report/report_view_model.dart +++ b/lib/features/home/report/report_view_model.dart @@ -1,3 +1,17 @@ import 'package:flutter/cupertino.dart'; -class ReportViewModel extends ChangeNotifier {} +class ReportViewModel extends ChangeNotifier { + final TextEditingController reportController = TextEditingController(); + + int get reportCharCount => reportController.text.length; + + ReportViewModel() { + reportController.addListener(() { + notifyListeners(); + }); + } + + bool postReport() { + return true; + } +} diff --git a/lib/route/routes.dart b/lib/route/routes.dart index 2d40bb3..ff6c910 100644 --- a/lib/route/routes.dart +++ b/lib/route/routes.dart @@ -22,6 +22,7 @@ import 'package:cogo/features/home/mentor_detail/views/mentor_introduction_scree import 'package:cogo/features/home/mentor_detail/views/mentor_question1_screen.dart'; import 'package:cogo/features/home/mentor_detail/views/mentor_question2_screen.dart'; import 'package:cogo/features/home/profile/profile_detail_screen.dart'; +import 'package:cogo/features/home/report/report_detail_screen.dart'; import 'package:cogo/features/home/report/report_screen.dart'; import 'package:cogo/features/home/search/search_screen.dart'; import 'package:cogo/features/mypage/mentor_introduce/my_mentor_introduce_screen.dart'; @@ -250,6 +251,13 @@ final AppRouter = GoRouter( child: const ReportScreen(), ), ), + GoRoute( + path: Paths.reportDetail, + pageBuilder: (context, state) => MaterialPage( + key: state.pageKey, + child: const ReportDetailScreen(), + ), + ), StatefulShellRoute.indexedStack( builder: (context, state, navigationShell) { return ScaffoldWithNestedNavigation( From 0048e320662cc6366d81301f8afc4d554e2cf0bc Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 17:27:31 +0900 Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=EB=B2=84=ED=8A=BC=20=ED=95=98?= =?UTF-8?q?=EB=8B=A8=20=EA=B0=84=EA=B2=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/home/report/report_detail_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/features/home/report/report_detail_screen.dart b/lib/features/home/report/report_detail_screen.dart index e20a949..bf52edf 100644 --- a/lib/features/home/report/report_detail_screen.dart +++ b/lib/features/home/report/report_detail_screen.dart @@ -61,7 +61,7 @@ class ReportDetailScreen extends StatelessWidget { '멘토링 과정에서 비매너 행위 발생\n- 잘못된 정보 제공\n- 상대방에 부적절한 언행\n- 기타 양자간 분쟁 가능성이 있는 비매너 행위', style: CogoTextStyle.body9, ), - const SizedBox(height: 30), + const SizedBox(height: 80), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ From 33e641b9956012557a08aaf4cfe6084c4dc678b3 Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 17:36:23 +0900 Subject: [PATCH 5/6] =?UTF-8?q?feat:=20=EB=B0=94=ED=85=80=EC=8B=9C?= =?UTF-8?q?=ED=8A=B8=20=ED=9D=B0=EC=83=89=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/features/home/profile/profile_detail_screen.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/features/home/profile/profile_detail_screen.dart b/lib/features/home/profile/profile_detail_screen.dart index dd3fca2..1300cf3 100644 --- a/lib/features/home/profile/profile_detail_screen.dart +++ b/lib/features/home/profile/profile_detail_screen.dart @@ -35,6 +35,7 @@ class ProfileDetailScreen extends StatelessWidget { onPressed: () { showModalBottomSheet( context: context, + backgroundColor: CogoColor.white50, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.vertical(top: Radius.circular(16)), @@ -201,7 +202,7 @@ class ProfileDetailScreen extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ ListTile( - leading: const Icon(Icons.report), + leading: const Icon(Icons.flag), title: const Text( '신고하기', style: CogoTextStyle.body16, From 66217160c27c093a4c45392b6f86a1b02e22c29b Mon Sep 17 00:00:00 2001 From: Yu Jin Date: Wed, 8 Jan 2025 17:47:29 +0900 Subject: [PATCH 6/6] feat: divider --- lib/features/home/report/report_screen.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/features/home/report/report_screen.dart b/lib/features/home/report/report_screen.dart index 4d277fa..972c3b0 100644 --- a/lib/features/home/report/report_screen.dart +++ b/lib/features/home/report/report_screen.dart @@ -47,6 +47,7 @@ class ReportScreen extends StatelessWidget { context.push(Paths.reportDetail); }, ), + const Divider(height: 1, color: CogoColor.systemGray02), ListTile( title: const Text( '멘토링 중에 분쟁 발생했어요', @@ -57,6 +58,7 @@ class ReportScreen extends StatelessWidget { context.push(Paths.reportDetail); }, ), + const Divider(height: 1, color: CogoColor.systemGray02), ListTile( title: const Text( '멘토의 소속이나, 인적사항이 거짓인것 같아요', @@ -67,6 +69,7 @@ class ReportScreen extends StatelessWidget { context.push(Paths.reportDetail); }, ), + const Divider(height: 1, color: CogoColor.systemGray02), ListTile( title: const Text('기타 부적절한 행위가 있었어요', style: CogoTextStyle.body16),