-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Fix DraggableScrollableSheet rebuilding during drag #111010
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
|
I need this. |
| // If an external facing controller was provided, let it know that the | ||
| // extent has been replaced. | ||
| widget.controller?._onExtentReplaced(previousExtent); | ||
| if (widget.controller?.isAttached ?? false) { |
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.
I'm curious why the new controller doesn't attached now?
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.
Actually, I realized that new controller is still not handled properly (_attach is only called in initState, never if we have a new controller). This isn't really related to my change, I found it while writing the test, where I wanted to show that builder was still called when we have a new controller. Going to update the changeset with proper change for giving a new controller.
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.
So this maybe another issue we should fix, right?
Maybe we should fix it in a separate file instead of temporarily circumventing it.
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.
I moved it to #111445
|
Any updates on this fix? |
51a4dc8 to
bfd3289
Compare
xu-baolin
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
DraggableScrollableSheetwas rebuilding every time the size of the child changed, which meant every frame during a drag. Now it will only rebuild when it gets changed parameters from the parent widget.Also inadvertent fix to an exception thrown while rebuilding
DraggableScrollableSheetwith a new controller.Fixes #67219
Pre-launch Checklist
///).