-
Notifications
You must be signed in to change notification settings - Fork 0
- Display repositories #2
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
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 integrates the ability to fetch and display a GitHub repository’s details using Riverpod and a new UI card component.
- Adds flutter_riverpod and integrates Riverpod providers across data, domain, and presentation layers
- Implements a
RepositoryCardwidget for UI and wires up network + use-case logic - Updates
main.dartto useProviderScope, new theme, and replaces default demo code
Reviewed Changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Added flutter_riverpod dependency |
| lib/src/shared/data/repository_provider.dart | Empty placeholder—likely unused |
| lib/src/feature/select_repository/presentation/widgets/... | New RepositoryCard UI component |
| lib/src/feature/select_repository/presentation/providers/... | getRepositoryProvider family for fetching data |
| lib/src/feature/select_repository/presentation/pages/... | SelectRepositoryPage wired to provider |
| lib/src/feature/select_repository/domain/... | Domain entities & use-case setup |
| lib/src/feature/select_repository/data/... | Remote data source, model, repository impl |
| lib/src/core/network/... | Renamed HttpClient→NetworkService, URL logic |
| lib/main.dart | Wrapped app in ProviderScope, updated theme |
| lib/config/theme.dart | Tweaks to CardThemeData |
Comments suppressed due to low confidence (2)
lib/src/feature/select_repository/data/data_source/repository_remote_datasource.dart:16
- The remote data source logic is critical and not covered by tests. Consider adding unit tests to verify correct JSON mapping and exception handling.
Future<RepositoryModel> fetchRepository(String ownerName, String repositoryName) async {
lib/src/feature/select_repository/presentation/widgets/repository_card_widget.dart
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/widgets/repository_card_widget.dart
Outdated
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/pages/select_repository_page.dart
Outdated
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/controllers/repository_controller.dart
Show resolved
Hide resolved
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 introduces the ability to fetch and display a GitHub repository’s details in the app using Riverpod for state management.
- Added networking, data models, use cases, and providers to fetch repository data
- Created
RepositoryCardwidget andSelectRepositoryPageto render repository information - Updated
main.dartto wrap the app inProviderScopeand applied a custom theme
Reviewed Changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Added flutter_riverpod dependency |
| lib/src/shared/data/repository_provider.dart | (Empty) placeholder file introduced |
| lib/src/feature/select_repository/presentation/widgets/repository_card_widget.dart | New UI component to render repository stats |
| lib/src/feature/select_repository/presentation/pages/select_repository_page.dart | Page widget fetching and showing repository via Riverpod |
| lib/src/feature/select_repository/presentation/controllers/repository_controller.dart | AsyncNotifier stub and fetch method |
| lib/src/core/network/network_service.dart | Renamed HTTP client, adjusted URL construction |
| lib/main.dart | Wrapped app in ProviderScope, removed demo template |
Comments suppressed due to low confidence (1)
lib/src/feature/select_repository/presentation/controllers/repository_controller.dart
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/pages/select_repository_page.dart
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/widgets/repository_card_widget.dart
Show resolved
Hide resolved
lib/src/feature/select_repository/presentation/pages/select_repository_page.dart
Outdated
Show resolved
Hide resolved
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.
😡
No description provided.