-
Notifications
You must be signed in to change notification settings - Fork 145
Fix: Add dynamic height constraints to prevent bottom sheet overflow #542
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: main
Are you sure you want to change the base?
Fix: Add dynamic height constraints to prevent bottom sheet overflow #542
Conversation
|
@SGI-CAPP-AT2 , could you please review this PR? The previous PR addressing this issue got mixed with #541, so I've created a separate one for clarity. |
|
@prateek-kalwar-95, add screenshot with keyboard closed |
|
@SGI-CAPP-AT2 , Added it. |
|
@prateek-kalwar-95 , I think the the gap you're having when keyboard opened is too large it should be equal to height of status bar so that more task inputs can be shown. |
|
@SGI-CAPP-AT2 , Yes, we can do that, but the save button is just below the status bar, which may make it difficult for users to tap. |
|
So we can put it at least 50px below the status bar. |
|
rn it overlaps with status bar, instead keep offset from top equal to height of status bar so it wont overlap. |
|
|
@SGI-CAPP-AT2 , For me, the height of the status bar is coming as zero, and this is happening because AddTaskBottomSheet is built inside a Container. |
|
@prateek-kalwar-95 final height = MediaQuery.viewInsetsOf(context).top;
|
|
@SGI-CAPP-AT2 ,tried but still coming zero. |
@prateek-kalwar-95, final height = MediaQuery.paddingOf(context).top; |
@SGI-CAPP-AT2 , This is also returning zero. |
Description
Implemented dynamic height calculation for the Add Task bottom sheet to prevent overflow on small screens when the keyboard opens. The sheet now adapts intelligently to available space and allows smooth scrolling through all form fields.
Fixes #534
Screenshots
before->
After ->
When keyboard closed ->
Checklist