From c6b645d50785beea01219b5f6730dc31e35cc4d1 Mon Sep 17 00:00:00 2001 From: kkosang Date: Sat, 26 Apr 2025 01:47:14 +0900 Subject: [PATCH 1/4] feat: dynamic progress bar --- .../presentation/pages/code_age/code_age_page.dart | 2 +- .../presentation/pages/code_job/code_job_page.dart | 2 +- .../code_lifestyle/code_lifestyle_drink_page.dart | 2 +- .../code_lifestyle/code_lifestyle_smoke_page.dart | 2 +- .../pages/code_name/code_name_page.dart | 2 +- .../pages/profile_area/profile_area_page.dart | 2 +- .../profile_image/profile_face_image_page.dart | 2 +- .../pages/profile_image/profile_image_page.dart | 2 +- .../profile_interest/profile_intereset_page.dart | 2 +- .../profile_lovestyle/profile_lovestyle_page.dart | 2 +- .../pages/profile_mbti/profile_mbti_page.dart | 2 +- .../presentation/widgets/sign_up_app_bar.dart | 14 +++++++++++--- 12 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lib/sign_up/presentation/pages/code_age/code_age_page.dart b/lib/sign_up/presentation/pages/code_age/code_age_page.dart index e31e794..9abda1f 100644 --- a/lib/sign_up/presentation/pages/code_age/code_age_page.dart +++ b/lib/sign_up/presentation/pages/code_age/code_age_page.dart @@ -17,7 +17,7 @@ class CodeAgePage extends StatelessWidget { final isValid = true; // todo 상태관리 return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 2), bottomNavigationBar: Padding( padding: const EdgeInsets.all(AppGaps.gap20), child: ConfirmButton( diff --git a/lib/sign_up/presentation/pages/code_job/code_job_page.dart b/lib/sign_up/presentation/pages/code_job/code_job_page.dart index fcfa1b4..d1f8a29 100644 --- a/lib/sign_up/presentation/pages/code_job/code_job_page.dart +++ b/lib/sign_up/presentation/pages/code_job/code_job_page.dart @@ -39,7 +39,7 @@ class _JobSelectionPageState extends ConsumerState { ]; return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 3), bottomNavigationBar: Padding( padding: const EdgeInsets.all(AppGaps.gap20), child: ConfirmButton(enabled: isValid), diff --git a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart b/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart index 29680e6..1bac47f 100644 --- a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart +++ b/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart @@ -25,7 +25,7 @@ class _CodeLifestyleDrinkPageState extends State { final drinkOptions = ['음주는 안해요', '약속 있을 때만 먹어요', '음주를 즐기는 매니아', '금주중']; return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 4), bottomNavigationBar: Padding( padding: const EdgeInsets.all(AppGaps.gap20), child: ConfirmButton( diff --git a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart b/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart index 2ed14aa..c106df7 100644 --- a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart +++ b/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart @@ -31,7 +31,7 @@ class _CodeLifestyleDrinkPageState extends State { ]; return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 5), bottomNavigationBar: Padding( padding: const EdgeInsets.all(AppGaps.gap20), child: ConfirmButton( diff --git a/lib/sign_up/presentation/pages/code_name/code_name_page.dart b/lib/sign_up/presentation/pages/code_name/code_name_page.dart index 1900372..bd61728 100644 --- a/lib/sign_up/presentation/pages/code_name/code_name_page.dart +++ b/lib/sign_up/presentation/pages/code_name/code_name_page.dart @@ -15,7 +15,7 @@ class CodeNamePage extends StatelessWidget { final isValid = true; // todo 상태관리 return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 1), body: SafeArea( child: Padding( padding: const EdgeInsets.all(AppGaps.gap24), diff --git a/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart b/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart index cc4556e..2e52d41 100644 --- a/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart +++ b/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart @@ -299,7 +299,7 @@ class _ProfileRegionPageState extends State { final screenHeight = MediaQuery.of(context).size.height; return Scaffold( - appBar: const SignUpAppBar(), + appBar: const SignUpAppBar(currentPage: 8), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/pages/profile_image/profile_face_image_page.dart b/lib/sign_up/presentation/pages/profile_image/profile_face_image_page.dart index d77cbe3..f3c10e3 100644 --- a/lib/sign_up/presentation/pages/profile_image/profile_face_image_page.dart +++ b/lib/sign_up/presentation/pages/profile_image/profile_face_image_page.dart @@ -20,7 +20,7 @@ class ProfileFaceImagePage extends ConsumerWidget { final screenHeight = MediaQuery.of(context).size.height; return Scaffold( - appBar: const SignUpAppBar(), + appBar: const SignUpAppBar(currentPage: 12), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/pages/profile_image/profile_image_page.dart b/lib/sign_up/presentation/pages/profile_image/profile_image_page.dart index 5547c8e..e407319 100644 --- a/lib/sign_up/presentation/pages/profile_image/profile_image_page.dart +++ b/lib/sign_up/presentation/pages/profile_image/profile_image_page.dart @@ -21,7 +21,7 @@ class ProfileImagePage extends ConsumerWidget { final screenHeight = MediaQuery.of(context).size.height; return Scaffold( - appBar: const SignUpAppBar(), + appBar: const SignUpAppBar(currentPage: 11), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart b/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart index 99b0f5f..bb16f48 100644 --- a/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart +++ b/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart @@ -47,7 +47,7 @@ class _ProfileInterestPageState extends State { final isValid = selectedIndexes.isNotEmpty; return Scaffold( - appBar: SignUpAppBar(), + appBar: SignUpAppBar(currentPage: 6), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart b/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart index 0ed62f7..6863ebe 100644 --- a/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart +++ b/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart @@ -74,7 +74,7 @@ class _ProfileLoveStylePageState extends State { final screenHeight = MediaQuery.of(context).size.height; return Scaffold( - appBar: const SignUpAppBar(), + appBar: const SignUpAppBar(currentPage: 7), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/pages/profile_mbti/profile_mbti_page.dart b/lib/sign_up/presentation/pages/profile_mbti/profile_mbti_page.dart index 3a4d2b4..1e00935 100644 --- a/lib/sign_up/presentation/pages/profile_mbti/profile_mbti_page.dart +++ b/lib/sign_up/presentation/pages/profile_mbti/profile_mbti_page.dart @@ -25,7 +25,7 @@ class ProfileMBTIPage extends ConsumerWidget { final viewModel = ref.read(profileMBTIProvider.notifier); return Scaffold( - appBar: const SignUpAppBar(), + appBar: const SignUpAppBar(currentPage: 9), bottomNavigationBar: Padding( padding: const EdgeInsets.symmetric( horizontal: AppGaps.gap20, diff --git a/lib/sign_up/presentation/widgets/sign_up_app_bar.dart b/lib/sign_up/presentation/widgets/sign_up_app_bar.dart index cad93d3..4c15531 100644 --- a/lib/sign_up/presentation/widgets/sign_up_app_bar.dart +++ b/lib/sign_up/presentation/widgets/sign_up_app_bar.dart @@ -2,14 +2,22 @@ import 'package:code_l/core/utills/design/app_colors.dart'; import 'package:flutter/material.dart'; class SignUpAppBar extends StatelessWidget implements PreferredSizeWidget { - const SignUpAppBar({super.key}); + final int currentPage; + const SignUpAppBar({super.key, required this.currentPage}); @override Size get preferredSize => Size.fromHeight(56); + static const int _totalPage = 12; + static const double _initProgress = 8.0; + + double get _progress { + if (currentPage == 0) return _initProgress; + return currentPage / _totalPage; + } + @override Widget build(BuildContext context) { - double progress = 0.20; // todo 진행률 관리 return SafeArea( child: Padding( @@ -33,7 +41,7 @@ class SignUpAppBar extends StatelessWidget implements PreferredSizeWidget { ), child: FractionallySizedBox( alignment: Alignment.centerLeft, - widthFactor: progress, // 진행률 + widthFactor: _progress, // 진행률 child: Container( decoration: BoxDecoration( color: AppColors.primary, From 11377a9e87b9a1da5ae1d03e95fb853ccac8fdcb Mon Sep 17 00:00:00 2001 From: kkosang Date: Sat, 26 Apr 2025 02:02:21 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20Navigate=20Sing=20Up=20Page=20-=20?= =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EB=B0=8F=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=EB=AA=85=20code~=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20profile~=EB=A1=9C=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile_age_page.dart} | 8 ++++---- .../profile_intereset_page.dart | 8 +++++++- .../profile_job_page.dart} | 20 +++++++++++++------ .../profile_lifestyle_drink_page.dart} | 14 ++++++------- .../profile_lifestyle_smoke_page.dart} | 14 ++++++------- .../profile_lifestyle_check_icon.dart} | 0 .../profile_lovestyle_page.dart | 8 +++++++- .../profile_name_page.dart} | 12 ++++++++--- .../profile_region_page.dart} | 8 +++++++- 9 files changed, 62 insertions(+), 30 deletions(-) rename lib/sign_up/presentation/pages/{code_age/code_age_page.dart => profile_age/profile_age_page.dart} (92%) rename lib/sign_up/presentation/pages/{code_job/code_job_page.dart => profile_job/profile_job_page.dart} (88%) rename lib/sign_up/presentation/pages/{code_lifestyle/code_lifestyle_drink_page.dart => profile_lifestyle/profile_lifestyle_drink_page.dart} (87%) rename lib/sign_up/presentation/pages/{code_lifestyle/code_lifestyle_smoke_page.dart => profile_lifestyle/profile_lifestyle_smoke_page.dart} (87%) rename lib/sign_up/presentation/pages/{code_lifestyle/widgets/code_lifestyle_check_icon.dart => profile_lifestyle/widgets/profile_lifestyle_check_icon.dart} (100%) rename lib/sign_up/presentation/pages/{code_name/code_name_page.dart => profile_name/profile_name_page.dart} (87%) rename lib/sign_up/presentation/pages/{profile_area/profile_area_page.dart => profile_region/profile_region_page.dart} (97%) diff --git a/lib/sign_up/presentation/pages/code_age/code_age_page.dart b/lib/sign_up/presentation/pages/profile_age/profile_age_page.dart similarity index 92% rename from lib/sign_up/presentation/pages/code_age/code_age_page.dart rename to lib/sign_up/presentation/pages/profile_age/profile_age_page.dart index 9abda1f..5a920a9 100644 --- a/lib/sign_up/presentation/pages/code_age/code_age_page.dart +++ b/lib/sign_up/presentation/pages/profile_age/profile_age_page.dart @@ -1,4 +1,4 @@ -import 'package:code_l/sign_up/presentation/pages/code_job/code_job_page.dart'; +import 'package:code_l/sign_up/presentation/pages/profile_job/profile_job_page.dart'; import 'package:code_l/sign_up/presentation/widgets/sign_up_app_bar.dart'; import 'package:code_l/sign_up/presentation/widgets/sign_up_confirm_button.dart'; import 'package:flutter/cupertino.dart'; @@ -8,8 +8,8 @@ import '../../../../core/utills/design/app_colors.dart'; import '../../../../core/utills/design/app_gaps.dart'; import '../../../../core/utills/design/app_typography.dart'; -class CodeAgePage extends StatelessWidget { - const CodeAgePage({super.key}); +class ProfileAgePage extends StatelessWidget { + const ProfileAgePage({super.key}); @override Widget build(BuildContext context) { @@ -25,7 +25,7 @@ class CodeAgePage extends StatelessWidget { onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => CodeJobPage()), + MaterialPageRoute(builder: (context) => ProfileJobPage()), ); }, ), diff --git a/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart b/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart index bb16f48..2f1fc44 100644 --- a/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart +++ b/lib/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart @@ -1,3 +1,4 @@ +import 'package:code_l/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart'; import 'package:code_l/sign_up/presentation/widgets/sign_up_app_bar.dart'; import 'package:flutter/material.dart'; @@ -56,7 +57,12 @@ class _ProfileInterestPageState extends State { child: ConfirmButton( enabled: isValid, onPressed: () { - // TODO: 다음 페이지 이동 로직 + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => ProfileLoveStylePage(), + ), + ); }, ), ), diff --git a/lib/sign_up/presentation/pages/code_job/code_job_page.dart b/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart similarity index 88% rename from lib/sign_up/presentation/pages/code_job/code_job_page.dart rename to lib/sign_up/presentation/pages/profile_job/profile_job_page.dart index d1f8a29..9046b47 100644 --- a/lib/sign_up/presentation/pages/code_job/code_job_page.dart +++ b/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart @@ -1,3 +1,4 @@ +import 'package:code_l/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_smoke_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -8,14 +9,14 @@ import '../../../../core/utills/design/app_typography.dart'; import '../../widgets/sign_up_app_bar.dart'; import '../../widgets/sign_up_confirm_button.dart'; -class CodeJobPage extends ConsumerStatefulWidget { - const CodeJobPage({super.key}); +class ProfileJobPage extends ConsumerStatefulWidget { + const ProfileJobPage({super.key}); @override - ConsumerState createState() => _JobSelectionPageState(); + ConsumerState createState() => _JobSelectionPageState(); } -class _JobSelectionPageState extends ConsumerState { +class _JobSelectionPageState extends ConsumerState { String? selectedJob; @override @@ -42,8 +43,15 @@ class _JobSelectionPageState extends ConsumerState { appBar: SignUpAppBar(currentPage: 3), bottomNavigationBar: Padding( padding: const EdgeInsets.all(AppGaps.gap20), - child: ConfirmButton(enabled: isValid), - ), + child: ConfirmButton( + enabled: isValid, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => ProfileLifestyleSmokePage()), + ); + }, + ),), body: SafeArea( child: Padding( padding: const EdgeInsets.symmetric( diff --git a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart b/lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_drink_page.dart similarity index 87% rename from lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart rename to lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_drink_page.dart index 1bac47f..24cbd87 100644 --- a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_drink_page.dart +++ b/lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_drink_page.dart @@ -1,4 +1,4 @@ -import 'package:code_l/sign_up/presentation/pages/code_lifestyle/widgets/code_lifestyle_check_icon.dart'; +import 'package:code_l/sign_up/presentation/pages/profile_lifestyle/widgets/profile_lifestyle_check_icon.dart'; import 'package:code_l/sign_up/presentation/widgets/sign_up_app_bar.dart'; import 'package:flutter/material.dart'; @@ -6,16 +6,16 @@ import '../../../../core/utills/design/app_colors.dart'; import '../../../../core/utills/design/app_gaps.dart'; import '../../../../core/utills/design/app_typography.dart'; import '../../widgets/sign_up_confirm_button.dart'; -import 'code_lifestyle_smoke_page.dart'; +import 'profile_lifestyle_smoke_page.dart'; -class CodeLifestyleDrinkPage extends StatefulWidget { - const CodeLifestyleDrinkPage({super.key}); +class ProfileLifestyleDrinkPage extends StatefulWidget { + const ProfileLifestyleDrinkPage({super.key}); @override - State createState() => _CodeLifestyleDrinkPageState(); + State createState() => _ProfileLifestyleDrinkPageState(); } -class _CodeLifestyleDrinkPageState extends State { +class _ProfileLifestyleDrinkPageState extends State { int? selectedIndex; @override @@ -33,7 +33,7 @@ class _CodeLifestyleDrinkPageState extends State { onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => CodeLifestyleSmokePage()), + MaterialPageRoute(builder: (context) => ProfileLifestyleSmokePage()), ); }, ), diff --git a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart b/lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_smoke_page.dart similarity index 87% rename from lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart rename to lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_smoke_page.dart index c106df7..30f79fd 100644 --- a/lib/sign_up/presentation/pages/code_lifestyle/code_lifestyle_smoke_page.dart +++ b/lib/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_smoke_page.dart @@ -1,4 +1,5 @@ -import 'package:code_l/sign_up/presentation/pages/code_lifestyle/widgets/code_lifestyle_check_icon.dart'; +import 'package:code_l/sign_up/presentation/pages/profile_interest/profile_intereset_page.dart'; +import 'package:code_l/sign_up/presentation/pages/profile_lifestyle/widgets/profile_lifestyle_check_icon.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -7,16 +8,15 @@ import '../../../../core/utills/design/app_gaps.dart'; import '../../../../core/utills/design/app_typography.dart'; import '../../widgets/sign_up_app_bar.dart'; import '../../widgets/sign_up_confirm_button.dart'; -import '../code_name/code_name_page.dart'; -class CodeLifestyleSmokePage extends StatefulWidget { - const CodeLifestyleSmokePage({super.key}); +class ProfileLifestyleSmokePage extends StatefulWidget { + const ProfileLifestyleSmokePage({super.key}); @override - State createState() => _CodeLifestyleDrinkPageState(); + State createState() => _CodeLifestyleDrinkPageState(); } -class _CodeLifestyleDrinkPageState extends State { +class _CodeLifestyleDrinkPageState extends State { int? selectedIndex; @override @@ -39,7 +39,7 @@ class _CodeLifestyleDrinkPageState extends State { onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => CodeNamePage()), + MaterialPageRoute(builder: (context) => ProfileInterestPage()), ); }, ), diff --git a/lib/sign_up/presentation/pages/code_lifestyle/widgets/code_lifestyle_check_icon.dart b/lib/sign_up/presentation/pages/profile_lifestyle/widgets/profile_lifestyle_check_icon.dart similarity index 100% rename from lib/sign_up/presentation/pages/code_lifestyle/widgets/code_lifestyle_check_icon.dart rename to lib/sign_up/presentation/pages/profile_lifestyle/widgets/profile_lifestyle_check_icon.dart diff --git a/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart b/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart index 6863ebe..e44c72d 100644 --- a/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart +++ b/lib/sign_up/presentation/pages/profile_lovestyle/profile_lovestyle_page.dart @@ -5,6 +5,7 @@ import '../../../../core/utills/design/app_colors.dart'; import '../../../../core/utills/design/app_gaps.dart'; import '../../../../core/utills/design/app_typography.dart'; import '../../widgets/sign_up_confirm_button.dart'; +import '../profile_region/profile_region_page.dart'; class ProfileLoveStylePage extends StatefulWidget { const ProfileLoveStylePage({super.key}); @@ -83,7 +84,12 @@ class _ProfileLoveStylePageState extends State { child: ConfirmButton( enabled: isValid, onPressed: () { - // TODO: 다음 페이지 이동 로직 + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const ProfileRegionPage(), + ), + ); }, ), ), diff --git a/lib/sign_up/presentation/pages/code_name/code_name_page.dart b/lib/sign_up/presentation/pages/profile_name/profile_name_page.dart similarity index 87% rename from lib/sign_up/presentation/pages/code_name/code_name_page.dart rename to lib/sign_up/presentation/pages/profile_name/profile_name_page.dart index bd61728..58fd3da 100644 --- a/lib/sign_up/presentation/pages/code_name/code_name_page.dart +++ b/lib/sign_up/presentation/pages/profile_name/profile_name_page.dart @@ -1,13 +1,14 @@ import 'package:code_l/core/utills/design/app_colors.dart'; import 'package:code_l/core/utills/design/app_gaps.dart'; import 'package:code_l/core/utills/design/app_typography.dart'; +import 'package:code_l/sign_up/presentation/pages/profile_age/profile_age_page.dart'; import 'package:flutter/material.dart'; import '../../widgets/sign_up_app_bar.dart'; import '../../widgets/sign_up_confirm_button.dart'; -class CodeNamePage extends StatelessWidget { - const CodeNamePage({super.key}); +class ProfileNamePage extends StatelessWidget { + const ProfileNamePage({super.key}); @override Widget build(BuildContext context) { @@ -27,7 +28,12 @@ class CodeNamePage extends StatelessWidget { SizedBox(height: AppGaps.gap40 + AppGaps.gap40), _buildCodeNameInputField(isValid, TextEditingController()), Spacer(), - ConfirmButton(enabled: isValid, onPressed: () {}), + ConfirmButton(enabled: isValid, onPressed: () { + Navigator.push( + context, + MaterialPageRoute(builder: (context) => ProfileAgePage()), + ); + }), ], ), ), diff --git a/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart b/lib/sign_up/presentation/pages/profile_region/profile_region_page.dart similarity index 97% rename from lib/sign_up/presentation/pages/profile_area/profile_area_page.dart rename to lib/sign_up/presentation/pages/profile_region/profile_region_page.dart index 2e52d41..8020206 100644 --- a/lib/sign_up/presentation/pages/profile_area/profile_area_page.dart +++ b/lib/sign_up/presentation/pages/profile_region/profile_region_page.dart @@ -1,3 +1,4 @@ +import 'package:code_l/sign_up/presentation/pages/profile_mbti/profile_mbti_page.dart'; import 'package:code_l/sign_up/presentation/widgets/sign_up_app_bar.dart'; import 'package:flutter/material.dart'; @@ -308,7 +309,12 @@ class _ProfileRegionPageState extends State { child: ConfirmButton( enabled: isValid, onPressed: () { - // TODO: 다음 페이지 이동 + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => const ProfileMBTIPage(), + ), + ); }, ), ), From a8a80b7cbc65251ac353c40e9312e53574ca0e3e Mon Sep 17 00:00:00 2001 From: kkosang Date: Tue, 29 Apr 2025 20:17:32 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/pages/profile_job/profile_job_page.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart b/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart index 9046b47..93cc678 100644 --- a/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart +++ b/lib/sign_up/presentation/pages/profile_job/profile_job_page.dart @@ -1,3 +1,4 @@ +import 'package:code_l/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_drink_page.dart'; import 'package:code_l/sign_up/presentation/pages/profile_lifestyle/profile_lifestyle_smoke_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -48,7 +49,7 @@ class _JobSelectionPageState extends ConsumerState { onPressed: () { Navigator.push( context, - MaterialPageRoute(builder: (context) => ProfileLifestyleSmokePage()), + MaterialPageRoute(builder: (context) => ProfileLifestyleDrinkPage()), ); }, ),), From 351c4a9494856be001d5fff433cb96b56872793c Mon Sep 17 00:00:00 2001 From: kkosang Date: Tue, 29 Apr 2025 21:15:52 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=EC=9D=B4=ED=83=88=20=EC=8B=9C,=20?= =?UTF-8?q?=EB=8B=A4=EC=9D=B4=EC=96=BC=EB=A1=9C=EA=B7=B8=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/utills/widgets/dialog.dart | 78 +++++++++++++++++++ .../presentation/widgets/sign_up_app_bar.dart | 19 ++++- 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 lib/core/utills/widgets/dialog.dart diff --git a/lib/core/utills/widgets/dialog.dart b/lib/core/utills/widgets/dialog.dart new file mode 100644 index 0000000..b539a8f --- /dev/null +++ b/lib/core/utills/widgets/dialog.dart @@ -0,0 +1,78 @@ +import 'package:code_l/core/utills/design/app_colors.dart'; +import 'package:flutter/material.dart'; + +import '../design/app_typography.dart'; + +class ConfirmDialog extends StatelessWidget { + final String title; + final String content; + final String leftButtonText; + final String rightButtonText; + final VoidCallback onLeftPressed; + final VoidCallback onRightPressed; + + const ConfirmDialog({ + super.key, + required this.title, + required this.content, + required this.leftButtonText, + required this.rightButtonText, + required this.onLeftPressed, + required this.onRightPressed, + }); + + @override + Widget build(BuildContext context) { + return Dialog( + backgroundColor: Colors.white, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 20), + Text( + title, + style: AppTypography.subtitle2 + ), + const SizedBox(height: 12), + Text( + content, + textAlign: TextAlign.center, + style: AppTypography.body2.copyWith( + color: AppColors.grey900, + ), + ), + const SizedBox(height: 20), + const Divider(height: 1,color: AppColors.grey200,), + Row( + children: [ + Expanded( + child: TextButton( + onPressed: onLeftPressed, + child: Text( + leftButtonText, + style: AppTypography.subtitle3.copyWith( + color: AppColors.grey900, + ), + ), + ), + ), + Container(width: 1, height: 55, color: Colors.grey.shade200), + Expanded( + child: TextButton( + onPressed: onRightPressed, + child: Text( + rightButtonText, + style: AppTypography.subtitle3.copyWith( + color: AppColors.grey900, + ), + ), + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/lib/sign_up/presentation/widgets/sign_up_app_bar.dart b/lib/sign_up/presentation/widgets/sign_up_app_bar.dart index 4c15531..c50c94e 100644 --- a/lib/sign_up/presentation/widgets/sign_up_app_bar.dart +++ b/lib/sign_up/presentation/widgets/sign_up_app_bar.dart @@ -1,5 +1,8 @@ import 'package:code_l/core/utills/design/app_colors.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import '../../../core/utills/widgets/dialog.dart'; class SignUpAppBar extends StatelessWidget implements PreferredSizeWidget { final int currentPage; @@ -56,7 +59,21 @@ class SignUpAppBar extends StatelessWidget implements PreferredSizeWidget { IconButton( icon: Icon(Icons.close), onPressed: () { - Navigator.pop(context); + showDialog( + context: context, + barrierDismissible: false, + builder: (context) => ConfirmDialog( + title: '나가기', + content: '회원가입이 완료되지 않았습니다.\n정말 종료하실건가요?', + leftButtonText: '종료', + rightButtonText: '계속', + onLeftPressed: () { + Navigator.of(context).pop(); + SystemNavigator.pop(); + }, + onRightPressed: () => Navigator.of(context).pop(), + ), + ); }, ), ],