Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ’„ style/MyPage UI #11 #12

Merged
merged 1 commit into from
May 30, 2024
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
6 changes: 6 additions & 0 deletions lib/assets/colors/color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ const Color mainOrange = Color(0xFFFF7A5D);
// κ°ˆμƒ‰
const Color mainBrown = Color(0xFF754342);

// 성별 색깔
// 남
const Color genderMale = Color(0xFFB1B9FF);
// μ—¬
const Color genderFemale = Color(0xFFFFBABA);

// νšŒμƒ‰ [ 밝은 순 ]
const Color grey1 = Color(0xFFF5F5F5);
const Color grey2 = Color(0xFFdedede);
Expand Down
4 changes: 4 additions & 0 deletions lib/assets/icon/icon_profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/assets/image/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import 'package:schedule_with/ui/login/view/login_main.dart';
import 'package:schedule_with/ui/login/view/login_password_reset.dart';
import 'package:schedule_with/ui/login/view/login_password_reset_done.dart';
import 'package:schedule_with/ui/login/view/login_read_terms.dart';
import 'package:schedule_with/ui/mypage/view/my_page_info_modify.dart';
import 'package:schedule_with/ui/notification/view/notification_main.dart';
import 'package:schedule_with/ui/notification/view/notification_request_detail.dart';
import 'package:schedule_with/widget/bottom_navigation_bar.dart';
import 'package:schedule_with/widget/main_bottom_navigation_bar.dart';

void main(){
runApp(ScheduleWith());
Expand All @@ -37,7 +38,7 @@ class _ScheduleWithState extends State<ScheduleWith> {
),
primarySwatch: Colors.blue
),
home: BottomNavigationBar2(),
home: MainBottomNavigationBar(),
// Name을 μ§€μ •ν•˜μ—¬ νŽ˜μ΄μ§€ 이동
getPages: [
GetPage(name: '/join', page: () => LoginJoin()),
Expand All @@ -50,6 +51,7 @@ class _ScheduleWithState extends State<ScheduleWith> {
GetPage(name: '/readTerms', page: () => LoginReadTerms()),
GetPage(name: '/notificationMain', page: () => NotificationMain()),
GetPage(name: '/requestDetail', page: () => NotificationRequestDetail()),
GetPage(name: '/myPageInfoModify', page: () => MyPageInfoModify()),
],
);
}
Expand Down
1 change: 1 addition & 0 deletions lib/ui/home/view/home_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class _HomeMainState extends State<HomeMain> {
supportedLocales: [
const Locale("ko","KO")
],
debugShowCheckedModeBanner: false,
home: Scaffold(
// ν™”λ©΄ 배경색 μ„€μ •
backgroundColor: Colors.white,
Expand Down
76 changes: 76 additions & 0 deletions lib/ui/mypage/view/my_page_info_modify.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:schedule_with/assets/colors/color.dart';
import 'package:schedule_with/widget/main_profile.dart';

class MyPageInfoModify extends StatefulWidget {
const MyPageInfoModify({super.key});

@override
State<MyPageInfoModify> createState() => _MyPageInfoModifyState();
}

class _MyPageInfoModifyState extends State<MyPageInfoModify> {
@override
Widget build(BuildContext context) {
return Scaffold(
// 상단 νˆ΄λ°” μ„€μ •
appBar: PreferredSize(
preferredSize: Size.fromHeight(50),
child: AppBar(
backgroundColor: Colors.white,
// λ’€λ‘œκ°€κΈ° λ²„νŠΌ
leading: IconButton(
padding: EdgeInsets.zero,
icon: SvgPicture.asset("lib/assets/icon/icon_angel_brackets.svg"),
onPressed: () {
Get.back();
},
),
// 타이틀
centerTitle: true,
title: Container(
padding: EdgeInsets.only(bottom: 8),
child: Text(
"κ°œμΈμ •λ³΄ μˆ˜μ •",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
),
// μ™„λ£Œ λ²„νŠΌ
actions: [
InkWell(
onTap: () {

},
child: Container(
padding: EdgeInsets.fromLTRB(0, 0, 10, 8),
child: Text("μ™„λ£Œ",style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: mainOrange),),
),
)
],
),
),
// κ°œμΈμ •λ³΄ μˆ˜μ • ν™”λ©΄
body: Column(
children: [
// ν”„λ‘œν•„ λ°°κ²½ 및 ν”„λ‘œν•„ 사진 및 이름 + μˆ˜μ • μ•„μ΄μ½˜ μ„€μ •
Expanded(
flex: 2,
child: MainProfile()
),
Expanded(
flex: 3,
child: Container(
color: Colors.green,
child: Text("zz"),
)
)

],
),
);
}
}
169 changes: 169 additions & 0 deletions lib/ui/mypage/view/my_page_main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:get/get.dart';
import 'package:schedule_with/assets/colors/color.dart';
import 'package:schedule_with/widget/main_button.dart';

import '../../../widget/main_app_bar.dart';

class MyPageMain extends StatefulWidget {
const MyPageMain({super.key});

@override
State<MyPageMain> createState() => _MyPageMainState();
}

class _MyPageMainState extends State<MyPageMain> {
@override
Widget build(BuildContext context) {
return Scaffold(
// ν™”λ©΄ 배경색 μ„€μ •
backgroundColor: Colors.white,
// 상단 νˆ΄λ°”
appBar: PreferredSize(
preferredSize: Size.fromHeight(50),
child: MainAppBar(),
),
body: Column(
children: [
// ν”„λ‘œν•„ 사진 + λ‹‰λ„€μž„ + μƒμ„Έλ‚΄μš© 보기 μ•„μ΄μ½˜ + 화면이동 μ„€μ •
InkWell(
onTap: () {
// κ°œμΈμ •λ³΄ μˆ˜μ • ν™”λ©΄μœΌλ‘œ 이동
Get.toNamed('/myPageInfoModify');
},
// ν”„λ‘œν•„ 사진 + λ‹‰λ„€μž„ + μƒμ„Έλ‚΄μš© 보기 μ•„μ΄μ½˜ μ„€μ •
child: Container(
margin: EdgeInsets.fromLTRB(20, 15, 20, 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// ν”„λ‘œν•„ 사진 + λ‹‰λ„€μž„ μ„€μ •
Row(
children: [
SvgPicture.asset(
"lib/assets/icon/icon_profile.svg",
color: genderMale
),
Padding(padding: EdgeInsets.only(right: 10)),
Text("λ‹‰λ„€μž„",style: TextStyle(fontSize: 16))
],
),
// μƒμ„Έλ‚΄μš© μ•„μ΄μ½˜ μ„€μ •
SvgPicture.asset("lib/assets/icon/icon_detail_open.svg")
],
),
),
),
// 디바이더 μ„€μ •
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Divider(
thickness: 1,
height: 1,
color: grey2,
),
),
// μ„€μ • ν™”λ©΄ 이동 + "μ„€μ •" ν…μŠ€νŠΈ μ„€μ •
InkWell(
// μ„€μ • ν™”λ©΄ 이동
onTap: () {
// μ„€μ • ν™”λ©΄ 이동
},
// "μ„€μ •" ν…μŠ€νŠΈ μ„€μ •
child: Container(
width: double.infinity,
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 0, 15),
child: Text("μ„€μ •"),
),
),
),
// 곡지사항 ν™”λ©΄ 이동 + "곡지사항" ν…μŠ€νŠΈ μ„€μ •
InkWell(
// 곡지사항 ν™”λ©΄ 이동
onTap: () {
// μ„€μ • ν™”λ©΄ 이동
},
// "곡지사항" ν…μŠ€νŠΈ μ„€μ •
child: Container(
width: double.infinity,
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 0, 15),
child: Text("곡지사항"),
),
),
),
// 정보 ν™”λ©΄ 이동 + "정보" ν…μŠ€νŠΈ μ„€μ •
InkWell(
// 정보 ν™”λ©΄ 이동
onTap: () {
// μ„€μ • ν™”λ©΄ 이동
},
// "정보" ν…μŠ€νŠΈ μ„€μ •
child: Container(
width: double.infinity,
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 0, 15),
child: Text("정보"),
),
),
),
// 문의 ν™”λ©΄ 이동 + "문의" ν…μŠ€νŠΈ μ„€μ •
InkWell(
// 문의 ν™”λ©΄ 이동
onTap: () {
// μ„€μ • ν™”λ©΄ 이동
},
// "문의" ν…μŠ€νŠΈ μ„€μ •
child: Container(
width: double.infinity,
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 0, 15),
child: Text("문의"),
),
),
),
// 디바이더 μ„€μ •
Container(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Divider(
thickness: 1,
height: 0.5,
color: grey2,
),
),
// 버전 정보 + "버전" ν…μŠ€νŠΈ μ„€μ •
Container(
width: double.infinity,
margin: EdgeInsets.fromLTRB(20, 15, 20, 15),
// 버전 정보 + "버전" ν…μŠ€νŠΈ μ„€μ •
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("버전"),
Text("1.1.1")
],
),
),
// λ‘œκ·Έμ•„μ›ƒ νŒμ—…μ°½ + "λ‘œκ·Έμ•„μ›ƒ" ν…μŠ€νŠΈ μ„€μ •
InkWell(
// λ‘œκ·Έμ•„μ›ƒ νŒμ—…μ°½ μ„€μ •
onTap: () {
// λ‘œκ·Έμ•„μ›ƒ νŒμ—…μ°½
},
// "λ‘œκ·Έμ•„μ›ƒ" ν…μŠ€νŠΈ μ„€μ •
child: Container(
width: double.infinity,
child: Container(
padding: EdgeInsets.fromLTRB(20, 15, 0, 15),
child: Text("λ‘œκ·Έμ•„μ›ƒ"),
),
),
),
],
),
);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import 'package:get/get.dart';
import 'package:schedule_with/assets/colors/color.dart';
import 'package:schedule_with/ui/home/view/home_main.dart';
import 'package:schedule_with/ui/login/view/login_main.dart';
import 'package:schedule_with/ui/mypage/view/my_page_main.dart';
import 'package:schedule_with/ui/notification/view/notification_main.dart';
import 'package:stylish_bottom_bar/stylish_bottom_bar.dart';

class BottomNavigationBarController extends GetxController {
var tabIndex = 2.obs;
}

class BottomNavigationBar2 extends StatelessWidget {
class MainBottomNavigationBar extends StatelessWidget {
final BottomNavigationBarController controller = Get.put(BottomNavigationBarController());

final List<Widget> pages = [
Expand All @@ -24,7 +25,7 @@ class BottomNavigationBar2 extends StatelessWidget {
// μ•ŒλžŒ 메인 ν™”λ©΄
HomeMain(),
// 더보기 메인 ν™”λ©΄
HomeMain(),
MyPageMain(),
];

@override
Expand Down
67 changes: 67 additions & 0 deletions lib/widget/main_profile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

import '../assets/colors/color.dart';

class MainProfile extends StatelessWidget {
const MainProfile({super.key});

@override
Widget build(BuildContext context) {
return Stack(
children: [
// λ°°κ²½ 이미지
Padding(
padding: EdgeInsets.only(bottom: 35),
child: Container(
width: double.infinity,
color: grey2,
// child 둜 λ°°κ²½ 이미지 μ„€μ •
child: Image.asset("lib/assets/image/profile.png",fit: BoxFit.cover,),
),
),
Positioned(
bottom: 0,
left: 16,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: 70,
height: 70,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.white,
border: Border.all(color: grey2,width: 0.5)
),
margin: EdgeInsets.only(bottom: 5),
child: FittedBox(
fit: BoxFit.cover,
child: SvgPicture.asset(
"lib/assets/icon/icon_profile.svg",
color: genderMale
)
)
),
Padding(
padding: EdgeInsets.fromLTRB(5, 0, 0, 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("이름",style: TextStyle(fontSize: 18,fontWeight: FontWeight.bold),),
Padding(
padding: EdgeInsets.fromLTRB(5, 0, 0, 2),
child: SvgPicture.asset("lib/assets/icon/icon_pen.svg"),
),

],
)
),
],
)
),
],
);
}
}