-
Notifications
You must be signed in to change notification settings - Fork 29.5k
[RenderListWheelViewport] Update content dimensions to prevent scroll offset changes #96102
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
|
Calling performLayout from within performLayout is really dubious... are we sure about this? |
|
(cc @Piinks who may have opinions on this code) |
Piinks
left a comment
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.
Hey @xu-baolin, happy new year! 🎉
I wonder how we handle this in other viewports, isn't there a correction we apply if !offset.applyContentDimensions?
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.
Adjust the content dimensions for there is a special test case which allows the delegate to provide a null widget child.
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 logic here is difficult to understand, so I linked this test case in the comments.
Yes, it seemed weird to do so, I changed a solution. |
Piinks
left a comment
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.
This looks a lot better, thanks for updating!
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.
Can you put this comment in the test itself? If a future change breaks the test, it will be helpful to have that context there as well.
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.
Why move this? It does not seem to change later in the course of laying out.
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.
Just move to where first use it.
Piinks
left a comment
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.
LGTM, nice!
…t scroll offset changes (flutter/flutter#96102)
…t scroll offset changes (flutter/flutter#96102)
…t scroll offset changes (flutter/flutter#96102)
…t scroll offset changes (flutter/flutter#96102)
Fixes #90953
Update content dimensions first when layout to prevent scroll offset changes.