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
78 changes: 78 additions & 0 deletions lib/core/utills/widgets/dialog.dart
Original file line number Diff line number Diff line change
@@ -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,
),
),
),
),
],
),
],
),
);
}
}
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -8,24 +8,24 @@ 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) {
final screenHeight = MediaQuery.of(context).size.height;
final isValid = true; // todo 상태관리

return Scaffold(
appBar: SignUpAppBar(),
appBar: SignUpAppBar(currentPage: 2),
bottomNavigationBar: Padding(
padding: const EdgeInsets.all(AppGaps.gap20),
child: ConfirmButton(
enabled: isValid,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CodeJobPage()),
MaterialPageRoute(builder: (context) => ProfileJobPage()),
);
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -47,7 +48,7 @@ class _ProfileInterestPageState extends State<ProfileInterestPage> {
final isValid = selectedIndexes.isNotEmpty;

return Scaffold(
appBar: SignUpAppBar(),
appBar: SignUpAppBar(currentPage: 6),
bottomNavigationBar: Padding(
padding: const EdgeInsets.symmetric(
horizontal: AppGaps.gap20,
Expand All @@ -56,7 +57,12 @@ class _ProfileInterestPageState extends State<ProfileInterestPage> {
child: ConfirmButton(
enabled: isValid,
onPressed: () {
// TODO: 다음 페이지 이동 로직
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ProfileLoveStylePage(),
),
);
},
),
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
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';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Expand All @@ -8,14 +10,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<CodeJobPage> createState() => _JobSelectionPageState();
ConsumerState<ProfileJobPage> createState() => _JobSelectionPageState();
}

class _JobSelectionPageState extends ConsumerState<CodeJobPage> {
class _JobSelectionPageState extends ConsumerState<ProfileJobPage> {
String? selectedJob;

@override
Expand All @@ -39,11 +41,18 @@ class _JobSelectionPageState extends ConsumerState<CodeJobPage> {
];

return Scaffold(
appBar: SignUpAppBar(),
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) => ProfileLifestyleDrinkPage()),
);
},
),),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
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';

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<CodeLifestyleDrinkPage> createState() => _CodeLifestyleDrinkPageState();
State<ProfileLifestyleDrinkPage> createState() => _ProfileLifestyleDrinkPageState();
}

class _CodeLifestyleDrinkPageState extends State<CodeLifestyleDrinkPage> {
class _ProfileLifestyleDrinkPageState extends State<ProfileLifestyleDrinkPage> {
int? selectedIndex;

@override
Expand All @@ -25,15 +25,15 @@ class _CodeLifestyleDrinkPageState extends State<CodeLifestyleDrinkPage> {
final drinkOptions = ['음주는 안해요', '약속 있을 때만 먹어요', '음주를 즐기는 매니아', '금주중'];

return Scaffold(
appBar: SignUpAppBar(),
appBar: SignUpAppBar(currentPage: 4),
bottomNavigationBar: Padding(
padding: const EdgeInsets.all(AppGaps.gap20),
child: ConfirmButton(
enabled: selectedIndex != null,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CodeLifestyleSmokePage()),
MaterialPageRoute(builder: (context) => ProfileLifestyleSmokePage()),
);
},
),
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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<CodeLifestyleSmokePage> createState() => _CodeLifestyleDrinkPageState();
State<ProfileLifestyleSmokePage> createState() => _CodeLifestyleDrinkPageState();
}

class _CodeLifestyleDrinkPageState extends State<CodeLifestyleSmokePage> {
class _CodeLifestyleDrinkPageState extends State<ProfileLifestyleSmokePage> {
int? selectedIndex;

@override
Expand All @@ -31,15 +31,15 @@ class _CodeLifestyleDrinkPageState extends State<CodeLifestyleSmokePage> {
];

return Scaffold(
appBar: SignUpAppBar(),
appBar: SignUpAppBar(currentPage: 5),
bottomNavigationBar: Padding(
padding: const EdgeInsets.all(AppGaps.gap20),
child: ConfirmButton(
enabled: selectedIndex != null,
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CodeNamePage()),
MaterialPageRoute(builder: (context) => ProfileInterestPage()),
);
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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});
Expand Down Expand Up @@ -74,7 +75,7 @@ class _ProfileLoveStylePageState extends State<ProfileLoveStylePage> {
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,
Expand All @@ -83,7 +84,12 @@ class _ProfileLoveStylePageState extends State<ProfileLoveStylePage> {
child: ConfirmButton(
enabled: isValid,
onPressed: () {
// TODO: 다음 페이지 이동 로직
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ProfileRegionPage(),
),
);
},
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
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) {
final screenHeight = MediaQuery.of(context).size.height;
final isValid = true; // todo 상태관리

return Scaffold(
appBar: SignUpAppBar(),
appBar: SignUpAppBar(currentPage: 1),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(AppGaps.gap24),
Expand All @@ -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()),
);
}),
],
),
),
Expand Down
Loading