-
Notifications
You must be signed in to change notification settings - Fork 0
π :: (#174) MatchList Page Connect Api #179
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
base: develop
Are you sure you want to change the base?
π :: (#174) MatchList Page Connect Api #179
Conversation
β¦feature/#174-matchlistpage-battingModal-api-connaction
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 connects the match list page to the backend API and integrates state management for loading and displaying match data.
- Adds a new GoRoute for the MatchListScreen with query parameters
- Implements
MatchListBlocwith event/state to fetch, filter, and sort matches - Wraps the MatchListScreen in a
BlocProviderand updates related UI components
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/router.dart | Registers matchList route with query parameters |
| lib/presentation/match_team_info/screens/match_team_screen.dart | Wraps existing layout in SafeArea |
| lib/presentation/match_list/screen/match_list_screen.dart | Integrates MatchListBloc and updates UI for loading and displaying matches |
| lib/presentation/match_list/bloc/match_list_event.dart | Renames event to LoadItems, adds SortOrder |
| lib/presentation/match_list/bloc/match_list_bloc.dart | Implements API call, filtering, and sorting logic |
| lib/presentation/match_detail/widget/match_participant_widget.dart | Fixes incorrect hardcoded redOrBlue parameter |
| lib/presentation/home/widgets/match_card/match_card_component.dart | Wraps team name Text in Expanded for ellipsis |
| lib/presentation/home/widgets/appbar/home_appbar.dart | Replaces hardcoded date with DateTime.now() |
| lib/presentation/community/screen/community_main_screen.dart | Uses LoadingIndicator and refactors filter tap |
Comments suppressed due to low confidence (2)
lib/presentation/match_list/bloc/match_list_bloc.dart:27
- Consider adding unit tests for
_onLoadItemsto verify API integration, filtering, and sorting behaviors.
Future<void> _onLoadItems(
lib/presentation/match_list/bloc/match_list_event.dart:5
- [nitpick] The event name
LoadItemsis generic. Consider renaming toFetchMatchListorLoadMatchListfor clearer intent.
class LoadItems extends MatchListEvent {
|
|
||
| if (event.gameType != null) { | ||
| filtered = | ||
| filtered.where((e) => event.gameType == event.gameType).toList(); |
Copilot
AI
May 30, 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.
The filter predicate compares event.gameType to itself, which is always true. It should compare each item's gameType, e.g., e.gameType == event.gameType.
| filtered.where((e) => event.gameType == event.gameType).toList(); | |
| filtered.where((e) => e.gameType == event.gameType).toList(); |
β¦listpage-battingModal-api-connaction # Conflicts: # lib/presentation/match_team_info/screens/match_team_screen.dart # lib/router.dart
β¦ngModal-api-connaction' into feature/#174-matchlistpage-battingModal-api-connaction
π‘ κ°μ
match list pageμ api μ°κ²°νμ΅λλ€
π μμ λ΄μ©
πββοΈ μ§λ¬Έμ¬ν
π΄ μ¬μ©λ°©λ²