-
Notifications
You must be signed in to change notification settings - Fork 0
π :: (#173) Publishing Bankrupcty modal #175
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
π :: (#173) Publishing Bankrupcty modal #175
Conversation
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.
Pull Request Overview
This PR adds a bankruptcy modal to inform users of their gambling loss status, persists their βdonβt show againβ choice, and integrates the new API into the Home screen flow.
- Introduces
BankruptcyModalwidget with UI and checkbox logic - Hooks modal display into
HomeScreenviaBlocConsumerand addsisBankruptcyhandling - Extends BLoC (
HomeState,HomeEvent,HomeBloc) for fetching/storing bankruptcy status - Adds
getWastedMeAPI, models, repository, and data source implementations
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart | New modal UI with βdonβt show againβ checkbox |
| lib/presentation/home/screen/home_screen.dart | Uses BlocConsumer to show the modal once and dispatches check event |
| lib/presentation/home/bloc/home_state.dart home_event.dart home_bloc.dart |
Added isBankruptcy, CheckBankruptcy event, and persistence logic |
| lib/data/models/stage/search_stage/search_wasted_me_response.dart stage_repository*.dart |
Added SearchWastedMeResponse and getWastedMe support |
| lib/design_system/component/stage/gogo_stage_card_component.dart | Minor navigation call update |
Comments suppressed due to low confidence (3)
lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart:22
- [nitpick] The method name
checkingBoxis ambiguous; consider renaming it to something more descriptive liketoggleCheckboxoronCheckboxTapped.
checkingBox() {
lib/presentation/home/widgets/bankruptcy_modal/bankruptcy_modal.dart:57
- The Korean text contains duplicated words (
μμ±νκ³ νκ³andμ μΆν¨μ μ μΆ). Please correct the typos for clarity.
β
Team. GOGOλ μ²μλ
λΆλ² λλ° κ·Όμ μΊ νμΈκ³Ό ν¨κ», ν λ²μ κΈ°νλ‘ κ±΄κ°ν 리μ
μ μ 곡ν©λλ€.
2μΈ΅ νλ² μ΄μ€μ λΉμΉλμ΄μλ μμ½μλ₯Ό μμ±νκ³ νκ³ μ μΆν¨μ μ μΆνλ©΄ ν λ²μ κΈ°νλ‘ ν¬μΈνΈλ₯Ό μ§μλ°μ μ μμ΅λλ€. (μ 체 ν¬μΈνΈμ νκ· , μ΅μ 3λ§, μ΅λ 5λ§)
κ·Έλ¬λ λ€μλ κ°μ μ€μλ₯Ό λ°λ³΅νμ§ λ§μΈμ.
lib/data/repositories/stage/stage_repository.dart:83
- New repository and API methods for
getWastedMehave been added but lack corresponding unit tests; consider adding tests for the repository, data source, and bloc logic.
Future<SearchWastedMeResponse> getWastedMe(int stageId);
| child: BlocConsumer<HomeBloc, HomeState>( | ||
| listener: (BuildContext context, HomeState state) async { | ||
| if (state is LoadedHomeState) { | ||
| print(state.isBankruptcy); |
Copilot
AI
May 29, 2025
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.
Remove the print statement or replace it with a proper logging mechanism; debug prints should not remain in production code.
| print(state.isBankruptcy); | |
| log('Bankruptcy status: ${state.isBankruptcy}', name: 'HomeScreen'); |
| class LoadingHomeState extends HomeState {} | ||
|
|
||
| class LoadedHomeState extends HomeState { | ||
| bool isBankruptcy = false; |
Copilot
AI
May 29, 2025
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.
Bloc state fields should be immutable. Consider declaring isBankruptcy as a final property and initializing it via the constructor.
| bool isBankruptcy = false; | |
| final bool isBankruptcy; |
π‘ κ°μ
π μμ λ΄μ©
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-05-29.at.16.14.35.mp4
πββοΈ μ§λ¬Έμ¬ν
π΄ μ¬μ©λ°©λ²