diff --git a/lib/views/edit_profie.dart b/lib/views/EditProfileDrawerScreen.dart similarity index 99% rename from lib/views/edit_profie.dart rename to lib/views/EditProfileDrawerScreen.dart index 8a4b64a..10c7f2a 100644 --- a/lib/views/edit_profie.dart +++ b/lib/views/EditProfileDrawerScreen.dart @@ -8,7 +8,7 @@ import 'package:provider/provider.dart'; import 'package:suwon/views/widgets/csbutton.dart'; import 'package:suwon/views/widgets/font.dart'; -class EditProfile extends StatelessWidget { +class EditProfileDrawerScreen extends StatelessWidget { final GlobalKey _formKey = GlobalKey(); @override diff --git a/lib/views/FeedbackDrawerScreen.dart b/lib/views/FeedbackDrawerScreen.dart new file mode 100644 index 0000000..00a9551 --- /dev/null +++ b/lib/views/FeedbackDrawerScreen.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:suwon/views/widgets/DrawerAppBarWidget.dart'; +import 'package:suwon/views/widgets/csbutton.dart'; + +class FeedbackDrawerScreen extends StatelessWidget { + final GlobalKey _formKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + return ScreenUtilInit( + designSize: Size(390, 844), + builder: (context, child) => Scaffold( + resizeToAvoidBottomInset: false, + body: Container( + margin: EdgeInsets.only(top: 88.h), + child: Form( + key: _formKey, + child: Column( + children: [ + Container( + //상단바 + margin: EdgeInsets.symmetric(horizontal: 20.w), + child: DrawerAppBarWidget( + text: '피드백', + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 32.w), + child: Column( + children: [ + SizedBox(height: 20.h), + TextField( + maxLength: 40, + maxLines: 9, // 여기에서 줄넘김 기능을 추가합니다. + decoration: InputDecoration( + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + ), + hintText: '앱 사용 시 불편한 점 또는 건의 사항이 있다면 자유롭게 작성해 주세요', + hintStyle: TextStyle( + fontFamily: 'Pretendard-Regular', + fontSize: 14.sp, + fontWeight: FontWeight.w400, + ), + counterText: '', + contentPadding: EdgeInsets.symmetric( + vertical: 20, horizontal: 12), + ), + ), + SizedBox(height: 24.h), + CustomButton( + text: "제출하기", + backgroundColor: Color(0xFF2D64D8), + onPressed: () {}, + color: Color(0xFFFFFFFF)) + ], + ), + ), + ], + ), + ), + )), + ); + } +} diff --git a/lib/views/Main_page.dart b/lib/views/Main_page.dart index a420f17..59c3ea5 100644 --- a/lib/views/Main_page.dart +++ b/lib/views/Main_page.dart @@ -2,7 +2,9 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:suwon/views/widgets/cancel_and_action_alert_dialog.dart'; -import 'package:suwon/views/edit_profie.dart'; +import 'package:suwon/views/EditProfileDrawerScreen.dart'; +import 'package:suwon/views/TermsConditionsDrawerScreen.dart'; +import 'package:suwon/views/FeedbackDrawerScreen.dart'; import 'package:suwon/views/login_screen.dart'; import 'package:suwon/views/matching_loding.dart'; @@ -167,7 +169,8 @@ class MainPage extends StatelessWidget { Navigator.push( context, MaterialPageRoute( - builder: (context) => EditProfile(), + builder: (context) => + EditProfileDrawerScreen(), ), ); }, @@ -189,7 +192,15 @@ class MainPage extends StatelessWidget { letterSpacing: -0.4.sp, ), ), - onTap: () {}, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + TermsConditionsDrawerScreen(), + ), + ); + }, trailing: Image.asset( 'asstes/Vector6.png', scale: 4.sp, @@ -208,7 +219,15 @@ class MainPage extends StatelessWidget { letterSpacing: -0.4.sp, ), ), - onTap: () {}, + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + FeedbackDrawerScreen(), + ), + ); + }, trailing: Image.asset( 'asstes/Vector6.png', scale: 4.sp, diff --git a/lib/views/TermsConditionsDrawerScreen.dart b/lib/views/TermsConditionsDrawerScreen.dart new file mode 100644 index 0000000..614aada --- /dev/null +++ b/lib/views/TermsConditionsDrawerScreen.dart @@ -0,0 +1,36 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:suwon/views/widgets/DrawerAppBarWidget.dart'; + +class TermsConditionsDrawerScreen extends StatelessWidget { + final GlobalKey _formKey = GlobalKey(); + + @override + Widget build(BuildContext context) { + return ScreenUtilInit( + designSize: Size(390, 844), + builder: (context, child) => Scaffold( + resizeToAvoidBottomInset: false, + body: Container( + margin: EdgeInsets.only(top: 88.h), + child: Form( + key: _formKey, + child: Column( + children: [ + Container( + //상단바 + margin: EdgeInsets.symmetric(horizontal: 20.w), + child: DrawerAppBarWidget( + text: '이용약관', + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ), + ], + ), + ), + )), + ); + } +} diff --git a/lib/views/widgets/DrawerAppBarWidget.dart b/lib/views/widgets/DrawerAppBarWidget.dart new file mode 100644 index 0000000..15ad629 --- /dev/null +++ b/lib/views/widgets/DrawerAppBarWidget.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class DrawerAppBarWidget extends StatelessWidget { + final String text; + final VoidCallback onPressed; + + const DrawerAppBarWidget({ + required this.text, + required this.onPressed, + }); + + @override + Widget build(BuildContext context) { + double iconScale = 4.sp; + double iconButtonPadding = 40.sp; + + return Container( + width: double.maxFinite, + height: 40.h, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // 아이콘 맨 오른쪽 정렬 위해서 왼쪽에 더미공간 추가 + SizedBox( + width: iconScale + iconButtonPadding, + height: iconScale + iconButtonPadding, + ), + Container( + alignment: Alignment.center, + child: Text( + text, + style: TextStyle( + fontFamily: 'Pretendard-Regular', + fontSize: 18.sp, + fontWeight: FontWeight.w600, + ), + ), + ), + IconButton( + onPressed: onPressed, + icon: Image.asset( + 'asstes/close.png', + scale: iconScale, + ), + ), + ], + ), + ); + } +}