Do not update a scaffold's AppBar scroll offset if the drawer is open#5343
Do not update a scaffold's AppBar scroll offset if the drawer is open#5343jason-simmons merged 1 commit intoflutter:masterfrom
Conversation
|
LGTM. |
7727209 to
cb56c24
Compare
There was a problem hiding this comment.
if (_drawerKey.currentState == null || _drawerKey.currentState.isOpen)
There was a problem hiding this comment.
_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.
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.
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