-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Do not update a scaffold's AppBar scroll offset if the drawer is open #5343
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
|
LGTM. |
7727209 to
cb56c24
Compare
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.
if (_drawerKey.currentState == null || _drawerKey.currentState.isOpen)
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.
_drawerKey.currentState?.isOpen ?? true should also work.
|
I'm not sure that this the right fix. The source of the problem is the lack of a scrollableKey for the Scaffold. Without that key, any scrollable that ends up on top of the appbar will generate scroll notifications that propel the appbar's animation. We could avoid this problem and some similar ones by putting the scroll notification listener around the scaffold's body, instead of being effectively around the entire scaffold. |
cb56c24 to
83bb936
Compare
|
Moved the scroll notification listener to the body widget. PTAL |
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 line could be in the if above.
|
You should probably reword the commit message. LGTM. |
83bb936 to
0e013ea
Compare
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.
Did you mean to add a blank line here?
|
LGTM with a test. |
0b7be21 to
87297f7
Compare
|
Added a test |
87297f7 to
a975f51
Compare
|
It would be useful to put a pointer to the issue in the test, since it's a regression test. LGTM |
Fixes #5131