From e2cf431c5269a5b7add770401c769dfd4eccac33 Mon Sep 17 00:00:00 2001 From: RnaYuta Date: Wed, 11 Oct 2023 16:43:46 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 메인페이지 완료 --- lib/views/Main_page.dart | 421 +++++++----------------------------- lib/views/login_screen.dart | 1 + 2 files changed, 78 insertions(+), 344 deletions(-) diff --git a/lib/views/Main_page.dart b/lib/views/Main_page.dart index a420f17..1ced468 100644 --- a/lib/views/Main_page.dart +++ b/lib/views/Main_page.dart @@ -14,349 +14,82 @@ class MainPage extends StatelessWidget { final _scaffoldKey = GlobalKey(); return ScreenUtilInit( - designSize: Size(390, 844), - builder: (context, child) => Scaffold( - key: _scaffoldKey, - resizeToAvoidBottomInset: false, - appBar: AppBar( - elevation: 0.0, + designSize: Size(390, 844), + builder: (context, child) => Scaffold( backgroundColor: Colors.white, - title: Container( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox(width: 20.sp), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - 'asstes/SUCHAT.png', - width: 74.sp, - height: 20.sp, - fit: BoxFit.fill, - ) - ], - ) - ], - ), - ), - centerTitle: false, - automaticallyImplyLeading: false, - actions: [ + key: _scaffoldKey, + resizeToAvoidBottomInset: false, + appBar: AppBar( + toolbarHeight: 80.h, + centerTitle: false, + automaticallyImplyLeading: false, + elevation: 0.0, + backgroundColor: Colors.white, + title: Container( + width: 96.w, + height: 80.h, + padding: EdgeInsets.zero, + margin: EdgeInsets.zero, child: Row( - mainAxisAlignment: MainAxisAlignment.center, children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - child: IconButton( - onPressed: () { - _scaffoldKey.currentState?.openEndDrawer(); - }, - icon: SvgPicture.asset( - 'asstes/Icon_menu.svg', - ), - ), - ) - ], - ), - SizedBox( - width: 28.sp, - ) + SizedBox(width: 15.w,), + Image.asset('asstes/SUCHAT.png', width: 76.w, height: 20.h, ) ], ), - ) - ], - ), - endDrawer: Drawer( - backgroundColor: Colors.white, - width: 250.sp, - child: Container( - height: 800.sp, - width: double.infinity, - child: ListView( - physics: const NeverScrollableScrollPhysics(), - padding: EdgeInsets.only(top: 0), - children: [ - Column( - children: [ - Container( - height: 85.sp, - child: Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - SizedBox( - width: 190.sp, - ), - IconButton( - onPressed: () {}, - icon: Image.asset( - 'asstes/close.png', - scale: 4.sp, - ), - ) - ], - ), - ), - UserAccountsDrawerHeader( - decoration: BoxDecoration(color: Colors.white), - margin: EdgeInsets.zero, - currentAccountPicture: CircleAvatar( - backgroundColor: Colors.white, - backgroundImage: AssetImage('asstes/Group.png'), - ), - currentAccountPictureSize: Size(49.sp, 49.sp), - accountName: Text( - 'AnSungMin', - style: TextStyle( - color: Colors.black, - fontFamily: 'KCCChassam', - fontSize: 22.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - ), - ), - accountEmail: Text( - '# ISTP', - style: TextStyle( - color: Color(0xff767676), - fontFamily: 'KCCChassam', - fontSize: 14.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - ), - ), - ), - Container( - height: 400.sp, - width: double.infinity, - decoration: BoxDecoration( - border: Border( - top: BorderSide( - color: Color(0xffEDEDED), - width: 1.sp, - ), - bottom: BorderSide( - color: Color(0xffEDEDED), - width: 1.sp, - ), - ), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - SizedBox( - height: 59.sp, - ), - ListTile( - leading: SvgPicture.asset('asstes/profile.svg'), - title: Text( - '프로필 수정', - style: TextStyle( - color: Colors.black, - fontFamily: 'Pretendard', - fontSize: 16.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: -0.4.sp, - ), - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => EditProfile(), - ), - ); - }, - trailing: Image.asset( - 'asstes/Vector6.png', - scale: 4.sp, - ), - ), - ListTile( - leading: SvgPicture.asset('asstes/policy.svg'), - title: Text( - '이용약관', - style: TextStyle( - color: Colors.black, - fontFamily: 'Pretendard', - fontSize: 16.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: -0.4.sp, - ), - ), - onTap: () {}, - trailing: Image.asset( - 'asstes/Vector6.png', - scale: 4.sp, - ), - ), - ListTile( - leading: SvgPicture.asset('asstes/feedback.svg'), - title: Text( - '피드백', - style: TextStyle( - color: Colors.black, - fontFamily: 'Pretendard', - fontSize: 16.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: -0.4.sp, - ), - ), - onTap: () {}, - trailing: Image.asset( - 'asstes/Vector6.png', - scale: 4.sp, - ), - ), - ListTile( - leading: SvgPicture.asset('asstes/logout.svg'), - title: Padding( - padding: EdgeInsets.zero, - child: Text( - '로그아웃', - style: TextStyle( - color: Colors.black, - fontFamily: 'Pretendard', - fontSize: 16.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: -0.4.sp, - ), - ), - ), - onTap: () { - CancelAndActionAlertDialog( - title: "로그아웃 하시겠습니까?", - action: "로그아웃", - onAction: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - NewLoignMain()), - ); - }, - onCancel: () {}) - .show(context); - }, - trailing: Image.asset( - 'asstes/Vector6.png', - scale: 4.sp, - ), - ), - SizedBox( - height: 100.sp, - ) - ], - ), - ), - Container( - height: 150.sp, - width: double.infinity, - color: Color(0xffEDEDED), - child: Row( - children: [ - SizedBox( - width: 32.sp, - ), - Column( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 15.sp, - ), - Image.asset( - 'asstes/SUCHAT.png', - scale: 3.sp, - ), - SizedBox( - height: 12.sp, - ), - Text( - 'Copyright 2023.\nFlag inc. all rights reserved.', - style: TextStyle( - color: Color(0xff767676), - fontFamily: 'Pretendard', - fontSize: 10.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: 0.25.sp, - ), - ), - TextButton( - onPressed: () {}, - child: Text( - '회원 탈퇴하기 >', - style: TextStyle( - color: Color(0xff767676), - fontFamily: 'Pretendard', - fontSize: 12.sp, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - letterSpacing: 0.3.sp, - ), - ), - style: TextButton.styleFrom( - padding: EdgeInsets.zero), - ) - ], - ) - ], - ) - ], - ), - ) - ], - ) - ], + ), + actions: [ + Container( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + child: SvgPicture.asset('asstes/onclikmenu.svg', width: 28.w, + height: 20.h), + ), + SizedBox(width: 32.w,), + ], + ), ), - )), - body: Container( - color: Colors.white, - child: Column( + ], + ), + body: Column( children: [ - SizedBox( - height: 18.sp, - ), Container( - child: Container( - child: Text( - '_배너', - style: TextStyle( - fontSize: 18.sp, - fontWeight: FontWeight.w400, - ), + child: Text( + '_배너', + style: TextStyle( + fontSize: 18.sp, + fontWeight: FontWeight.w400, ), - alignment: Alignment.center, - height: 55.sp, - width: 390.sp, - color: Color(0xffDBDBDB), ), + alignment: Alignment.center, + height: 55.h, + width: 390.w, + color: Color(0xffDBDBDB), ), - Container( - height: 331.h, - width: double.infinity, - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration(color: Colors.white), - child: Transform.scale( - scale: 1.sp, - child: Transform.translate( - offset: const Offset(25, -60), - child: Image.asset( - 'asstes/bubble_main.PNG', - scale: 1.sp, - fit: BoxFit.fill, + Row( + children: [ + SizedBox(width: 32.w,), + Container( + height: 335.h, + width: 358.w, + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration(color: Colors.white), + child: Transform.scale( + scale: 1, + child: Transform.translate( + offset: const Offset(0, -60), + child: ClipRect( + child: Image.asset( + 'asstes/bubble_main.PNG', + fit: BoxFit.fill, + ), + ), + ), ), ), - ), + ], ), Container( child: CustomButton_main( @@ -365,14 +98,15 @@ class MainPage extends StatelessWidget { Navigator.push( context, MaterialPageRoute( - builder: (context) => MatchingLoading()), + builder: (context) => MatchingLoading() + ), ); }, ), ), SizedBox( - height: 24.sp, - width: double.infinity, + height: 24.h, + width: 360.w, ), Container( child: Text( @@ -383,17 +117,17 @@ class MainPage extends StatelessWidget { fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: 14.sp, - letterSpacing: -0.4.sp, + letterSpacing: -0.4, ), ), ), SizedBox( - height: 120.sp, - width: double.infinity, + height: 120.h, + width: 390.w, ), Container( - height: 20.sp, - width: double.infinity, + height: 20.h, + width: 390.w, child: Text( '@copyright by Flag', textAlign: TextAlign.center, @@ -402,14 +136,13 @@ class MainPage extends StatelessWidget { fontFamily: 'Pretendard', fontSize: 12.sp, fontWeight: FontWeight.w400, - letterSpacing: 0.3.sp, + letterSpacing: 0.3, ), ), ) ], ), - ), - ), + ) ); } } @@ -426,10 +159,10 @@ class CustomButton_main extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - height: 64.sp, - width: 334.sp, + height: 64.h, + width: 334.w, decoration: BoxDecoration( - borderRadius: BorderRadius.circular(25.w), + borderRadius: BorderRadius.circular(25.r), color: Color(0xff2D64D8), ), child: TextButton( @@ -447,4 +180,4 @@ class CustomButton_main extends StatelessWidget { ), ); } -} +} \ No newline at end of file diff --git a/lib/views/login_screen.dart b/lib/views/login_screen.dart index d1c72c0..36ee24a 100644 --- a/lib/views/login_screen.dart +++ b/lib/views/login_screen.dart @@ -11,6 +11,7 @@ import 'package:suwon/views/widgets/font.dart'; import 'Login_page_searchPW.dart'; + class NewLoignMain extends StatelessWidget { const NewLoignMain({super.key}); From ad224830f02f240ed40e51b8cf238abe219a2a07 Mon Sep 17 00:00:00 2001 From: RnaYuta Date: Wed, 11 Oct 2023 17:22:03 +0900 Subject: [PATCH 2/2] Update Main_page.dart --- lib/views/Main_page.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/views/Main_page.dart b/lib/views/Main_page.dart index 1ced468..cc80be2 100644 --- a/lib/views/Main_page.dart +++ b/lib/views/Main_page.dart @@ -44,10 +44,10 @@ class MainPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.end, children: [ Container( - child: SvgPicture.asset('asstes/onclikmenu.svg', width: 28.w, - height: 20.h), + child: IconButton(icon: SvgPicture.asset('asstes/onclikmenu.svg', width: 28.w, + height: 20.h), onPressed: (){},) ), - SizedBox(width: 32.w,), + SizedBox(width: 25.w,), ], ), ),