-
Notifications
You must be signed in to change notification settings - Fork 70
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
Janky animation when navigating away from variable-height stateful widget #184
Comments
We’re experiencing the same issue and its disturbing. Are there any updates ? |
@ulusoyca We have a future builder that loads a list of items ( or illustration if empty ). Initially, it shows a loading indicator that has a certain fixed height. Switching to another page in the modal sheet works fine while it's loading (still on the initial size). However, once the data loads and the height changes, switching pages causes a sudden change to the maximum height before switching to the next page. Placing AnimatedSize widgets didn’t help. WhatsApp.Video.2024-09-27.at.08.50.09.mp4 |
Any updates on this bug ? |
@ibraheemalayan this bug is appearing only if there is more than on child in the main content, if you are placing your main content in a column then try to make that column with only one widget, this is not a solution but might be useful for debugging.
As a result: wolt_modal.webmwithout the sibling (or omitting the column):
As a result: wolt_modal_trans.webm[update] this is one of the scenarios that produces this issue, I have tried the same technique with different UI element rather than the container and the issue might happen even there is only one child in the column |
Bug report
Describe the bug
First off, I love WoltModalSheet, it makes multi-page modals so easy!
However, I've been running into a pretty rough issue - whenever changing between modal pages where the first modal page is a
StatefulWidget
that varies in height based on its state, the animation between modals becomes extremely janky.StatefulWidget
's default state and current stateHere's a video to illustrate. At 0:08 I change the height of the first modal and then navigate to the second modal, which shows the bug:
screen-20240419-152521.mp4
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
Expected to see a smooth transition between the heights of the current modal page and the next page.
Additional context
Below is the code for the example in the video. In my code I vary the height of a
Container
but this will work with anything that affects widget height, e.g.Visibility
, etc, and still occurs even if you add smooth animations between heights. It will also work regardless of whether the second page has static or variable height.The text was updated successfully, but these errors were encountered: