Category responsive + fix scrollable #797
Category responsive + fix scrollable #797mahmoudr80 wants to merge 4 commits intoAOSSIE-Org:masterfrom
Conversation
|
🎉 Welcome @mahmoudr80!
We appreciate your contribution! 🚀 |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCategoryScreen and app entrypoint updated for responsive layout: added flutter_screenutil, wrapped GetMaterialApp with ScreenUtilInit, adjusted AppBar, enabled default back button, converted fixed sizes/paddings to ScreenUtil-scaled values, removed non-scrollable ListView constraints, and restructured the empty-state layout for centered, responsive presentation. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/views/screens/category_screen.dart`:
- Around line 58-63: The empty-state currently uses a fixed bottom padding
(EdgeInsets.only(bottom: 150.0.h)) and Column with mainAxisSize:
MainAxisSize.min which prevents true vertical centering; remove the hard-coded
bottom padding, set the Column's mainAxisSize to MainAxisSize.max (or wrap the
Column in a Center/SizedBox.expand), and keep mainAxisAlignment:
MainAxisAlignment.center so the children are vertically centered on all screen
sizes (update the Padding/Column usage shown around EdgeInsets.only(bottom:
150.0.h), Column, mainAxisAlignment and mainAxisSize).
In `@pubspec.yaml`:
- Line 32: The app root is not initializing ScreenUtil, so responsive extensions
(.w/.h) will be invalid; update the widget tree in main.dart by wrapping the
existing GetMaterialApp with ScreenUtilInit (from flutter_screenutil) and pass
an appropriate designSize (e.g., Size(375, 812) or your chosen mockup
dimensions) plus the builder that returns the GetMaterialApp so ScreenUtil is
available app-wide; ensure imports include flutter_screenutil and remove any
duplicate MaterialApp/GetMaterialApp instantiation if necessary.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5db68514-323d-44a1-b93c-cbe7cfe9997f
📒 Files selected for processing (2)
lib/views/screens/category_screen.dartpubspec.yaml
Description
This pull request fixes UI and usability issues in the CategoryScreen.
Fixed a critical issue where the ListView was not scrollable due to incorrect configuration (NeverScrollableScrollPhysics, shrinkWrap, and primary used together).
Improved layout responsiveness by removing hard-coded bottom padding (150.0) and replacing it with a centered layout for better adaptability across different screen sizes.
These changes improve user experience, ensure proper scrolling behavior, and make the UI responsive on all devices.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Ran the application on emulator and verified:
The list of stories scrolls correctly.
No scrolling issues occur when the list is long.
Tested empty state:
Verified that the empty-state UI is properly centered on different screen sizes.
Tested on multiple screen sizes using responsive tools (flutter_screenutil).
Steps to reproduce:
Open the app
Navigate to CategoryScreen
Verify:
Stories list scrolls normally
Empty state appears centered when no data is available
Checklist:
Maintainer Checklist
Summary by CodeRabbit
New Features
Improvements