-
Notifications
You must be signed in to change notification settings - Fork 1
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
[학식] 페이지 UI 퍼블리싱 #22
[학식] 페이지 UI 퍼블리싱 #22
Conversation
현재 에디터에서 develop브랜치를 받으시면 에디터상에서 충돌이날것이고 거기서 해결하시고 다시 push하시면 될 것 같습니다.
==> 충돌 해결
|
fix: resolve merge conflict
아하 자세한 설명 감사합니다! 말씀해주신대로 merge 하니까 conflict 오류 없어졌네요! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
많이 배웠습니다!
기여 감사합니다💪
@@ -11,3 +11,4 @@ linter: | |||
analyzer: | |||
errors: | |||
invalid_annotation_target: ignore | |||
exclude: [build/**, lib/**.freezed.dart, lib/**.g.dart] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good😎
import 'package:cnubot_app/app/4_view/0_constant/constant_color.dart'; | ||
import 'package:cnubot_app/app/4_view/0_constant/constant_text_style.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
|
||
class GrayWeekdayButton extends StatelessWidget { | ||
const GrayWeekdayButton({ | ||
Key? key, | ||
required this.text, | ||
}) : super(key: key); | ||
|
||
final String text; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
padding: EdgeInsets.fromLTRB(6.w, 3.h, 6.w, 3.h), | ||
margin: EdgeInsets.fromLTRB(4.w, 0, 3.w, 0), | ||
decoration: BoxDecoration( | ||
color: kGrayEE, | ||
borderRadius: BorderRadius.circular(100.r), | ||
), | ||
child: Text( | ||
text, | ||
style: kBody5, | ||
), | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gray_time_button괴
gray_weekday_button 만들어주신것 정말 좋은 것같습니다!
하지만, 같은 디자인인데 추후에 time과 weekday에 관련이 없는 부분이 해당 위젯을 사용해야할 때 헷갈릴 것 같습니다!
디자인은 gray_weekday_button이라서 GrayWeekdayButton 를쓰려하는데 Weekday랑은 전혀 상관없는 도메인일수도 있습니다.
1_component/0_button
은 특정 도메인에 속하지 않은 common 위젯을 모아두는 곳이므로 도메인(time, weekday)을 빼고 보다 더 제네럴 하게 이름을 짓는 것은 어떨까요?
DeepGraybutton
, lightGrayButton
요런 느낌으로요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 재사용하려면 그렇게 변경하는 것이 좋을 것 같습니다! 수정했습니다~
icon: NavItem( | ||
assetName: 'n', | ||
selected: currentPage.index == 0 ? true : false, | ||
final double bnbHeight = Platform.isIOS ? 110.h : 87.h; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOS랑 다르게 처리하신 이유가 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다! 적절하게 처리하신것같아요!
required this.updateCurrentPage, | ||
}) : super(key: key); | ||
|
||
final NavPage currentPage; | ||
final bool visible; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
항상 스크롤에 따른 무언가 보여줌을 어떻게 처리해야할지 궁금했는데,
너무 잘 구현해주셔서 감사합니다.
visible 이 바뀌는 과정에서 overflow warning 네모박스가 다음 동영상과 같이 나오는데 해결가능할까요?
Screen.Recording.2022-12-03.at.10.31.29.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iphone pro max ios 16.0 환경입니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flutter run --release
해서 릴리즈 환경에서는 오버플로우 박스 안보이긴 하는데,
label을 넣으면 항상 텍스트가 있는데, height가 0이 되면서 오버플로우는 어쩔 수 없는 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 release 환경에서는안보이군요! 그러면 ok입니다!
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 'n', | ||
selected: currentPage.index == 0 ? true : false, | ||
), | ||
label: NavPage.notice.displayName, | ||
), | ||
label: NavPage.notice.displayName, | ||
), | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 'm', | ||
selected: currentPage.index == 1 ? true : false, | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 'm', | ||
selected: currentPage.index == 1 ? true : false, | ||
), | ||
label: NavPage.food.displayName, | ||
), | ||
label: NavPage.food.displayName, | ||
), | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 't', | ||
selected: currentPage.index == 2 ? true : false, | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 't', | ||
selected: currentPage.index == 2 ? true : false, | ||
), | ||
label: NavPage.bus.displayName, | ||
), | ||
label: NavPage.bus.displayName, | ||
), | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 'l', | ||
selected: currentPage.index == 3 ? true : false, | ||
BottomNavigationBarItem( | ||
icon: NavItem( | ||
assetName: 'l', | ||
selected: currentPage.index == 3 ? true : false, | ||
), | ||
label: NavPage.library.displayName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 코드 줄이는 좋은 방법인 것 같습니다! 추가했습니다~
import 'package:cnubot_app/app/4_view/0_constant/enum/day_type.dart'; | ||
import 'package:cnubot_app/app/4_view/1_component/0_button/gray_button.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class DayButton extends StatelessWidget { | ||
const DayButton({ | ||
Key? key, | ||
required this.dayType, | ||
required this.currentType, | ||
this.onTap, | ||
}) : super(key: key); | ||
final DayType dayType; | ||
final DayType currentType; | ||
final Function? onTap; | ||
@override | ||
Widget build(BuildContext context) { | ||
return InkWell( | ||
onTap: () { | ||
if (onTap != null) { | ||
onTap!(dayType); | ||
} | ||
}, | ||
child: GrayRoundButton( | ||
isSelected: dayType == currentType, | ||
text: dayType.displayName, | ||
), | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 파일 명이
dat_button.dart
인데 day_button.dart
로 안하신 이유가 있으신가요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 파일명 오타가 났네요 수정했습니다~
SizedBox( | ||
width: 60.w, | ||
child: Text( | ||
firstShFoodModel.foodName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
디자인이 그렇군요! ㅠ
그러면 그렇게 중앙정렬 유지하는게 좋을 것 같습니다!😂
} | ||
} | ||
|
||
void getFirstSHFoodModelList({bool? refresh}) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
철희님 지금까지 작업해주신 컨벤션 보면
getFirstSHFoodModelList
=> getFirstShFoodModelList
이렇게 되어야하는데 getFirstSHFoodModelList 로 작업하신 이유가 있으신가요?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞습니다 수정했습니다!
SH -> Sh
Describe your changes
영상으로 확인하기
학식 페이지 UI 개발
1. 공통 컴포넌트 설계
2. UI 화면 설계
상위 카테고리
하위 카테고리
식단, 메뉴 표시
아래로 스크롤시 BottomNavigation 숨기기
3. Controller, Provider, Repository 설계 - 3 layered architecture
4. 더미 데이터 추가
5. 원산지 파싱
Fixes #21
Checklist
Next Step Todo (optional)
Questions
git push --force
로 해결해도 될까요? 어떤 방법이 좋을지 궁금합니다!