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

Feat: 이용약관 페이지 추가를 위한 상품 탭 레이아웃 수정 #18

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

changhwan77
Copy link
Collaborator

@changhwan77 changhwan77 commented Mar 6, 2024

Title

Feat: 이용약관 페이지 추가를 위한 상품 탭 레이아웃 수정

What type of PR is this?

  • 🍕 Feature ( 새로운 기능 추가 )
  • 🐛 Bug Fix ( 버그 수정 )
  • 📝 Documentation Update ( 개발자 관련 문서 업데이트 )
  • 🎨 Style ( 코드 포맷팅, 세미콜론 누락, 코드 변경이 없는 경우 )
  • 🧑‍💻 Code Refactor ( 코드 리펙토링 )
  • 🔥 Performance Improvements ( 성능 향상 )
  • ✅ Test ( 테스트 코드, 리펙토링 테스트 코드 추가 )
  • 🤖 Build ( 빌드 )
  • 🔁 CI
  • 📦 Chore (Release) (빌드 업무 수정, 패키지 매니저 수정 )
  • ⏩ Revert ( 커밋을 날린 경우 )

Description

Related Issue number and link

  • Jira :
  • Issue :

Mobile & Desktop Screenshots/Recordings

default.mp4

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

To Reviewers

이용약관 카드 클릭 시 이용약관 페이지가 뜨도록 구현 예정입니다!

@@ -10,7 +10,7 @@ import 'package:tuti/features/profile/views/profile_screen.dart';
import 'package:tuti/features/tutis/views/tuti_screen.dart';
import 'package:tuti/features/tutis/widgets/tuti_widgets/tuti_login_dialog.dart';

import '../features/tutis/views/personal_branding_screen.dart';
import '../features/tutis/views/s_personal_branding.dart';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디렉토리에서 파일을 찾을 때 이름을 찾는데 시간을 줄이기 위해 screen 파일은 앞글자를 따 s로 통일 시킬 예정입니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

카카오페이 가맹점 신청을 위해 임시로 데이터를 사용했습니다. 추후 서버에서 받아와 뿌릴 예정입니다.

this.subContents,
this.subTitle,
required this.onTap,
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

회사 관련 정보 객체를 만들어줬습니다.

일단은 회사 소개 관련 카드를 봤을 때 title, contents, subtitle, subcontents, ontap 메서드로 분해가 되어 이렇게 설정했습니다.

},
);

List<CompanyInfo> companyInfos = [companyInfo, customerCenter];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

회사 정보 객체를 담은 배열 생성해주었고 이를 매핑하여 회사 정보 관련 카드를 동적으로 생성합니다.

);
} else {
return const SliverToBoxAdapter(
child: CircularProgressIndicator(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List형식으로 상품 컨테이너가 생성되고 있고 상품 컨테이너가 사용하는 Goods 정보는 서버에서 받아오는 AsyncValue 객체이기 때문에 이를 handle하기 위해 hasValue, hasError, else로 분기를 나눠 처리해습니다.

@@ -13,18 +13,20 @@ class TuTiBanner extends ConsumerWidget {
{super.key,
required this.onTap,
required this.title,
required this.subtitle});
required this.subtitle,
this.margin});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

객체 생성 시 constraintScaffold에서 제약 조건을 부과하고 있어 임의로 해당 배너의 크기를 조절하지 못하여 margin을 받아 custom하게 크기를 조절해주기 위해 margin을 받도록 했습니다.

style: Theme.of(context).textTheme.titleSmall!.copyWith(
fontSize: 10.sp,
color: Colors.black,
fontWeight: FontWeight.w100),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visibilty 위젯을 사용해 subContents는 null일 수도 있기 때문에 이를 처리하기 위해 visible에 해당 로직을 설정해 null일 땐 보이지 않도록, true일 때는 보이도록 설정했습니다.

GoRoute(
name: TermsOfUseScreen.routeName,
path: TermsOfUseScreen.routePath,
builder: (context, state) => const TermsOfUseScreen()),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이용약관 페이지로 이동시키기 위해 route를 추가해줬습니다.

@changhwan77 changhwan77 merged commit 903ceb4 into Tuti-Project:feature Mar 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant