Repository navigation
Pesto: Fix app bar height when returning from recipe page. - #4579
Merged
Merged
Conversation
Contributor
Author
|
cc @Hixie This is super subtle and took me rifling through the sources to figure out the fix. Is it intended that the Scaffold key could affect something like this? If so, I think we need to explain keys a bit better (I still don't quite get when I need to supply them.) |
Contributor
|
LGTM |
The problem was that the Scaffold was getting a new key each time we navigated to the main page. The key influences where page state is stored, including the scroll offset. So for a single frame, the Scaffold incorrectly thinks the scroll offset is 0 and the app bar should be expanded. BUG=#4400
Contributor
|
The key is the object's identity. If you provide the scaffold with a new key, you're saying "this is an entirely new scaffold unrelated to any earlier scaffolds". So yes, this resets its state and so forth. I agree we need more docs on this. Feel free to file a bug on that. File bugs on anything you get trouble with, even if it's just asking for docs. |
This was referenced Jun 15, 2016
cdotstout
pushed a commit
to cdotstout/flutter
that referenced
this pull request
Apr 3, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem was that the Scaffold was getting a new key each time we
navigated to the main page. The key influences where page state is
stored, including the scroll offset. So for a single frame, the Scaffold
incorrectly thinks the scroll offset is 0 and the app bar should be
expanded.
BUG=#4400