Skip to content

Pesto: Fix app bar height when returning from recipe page. - #4579

Merged
mpcomplete merged 1 commit into
flutter:masterfrom
mpcomplete:appbarheight
Jun 16, 2016
Merged

mpcomplete merged 1 commit into
flutter:masterfrom
mpcomplete:appbarheight

Conversation

@mpcomplete

Copy link
Copy Markdown
Contributor

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

@mpcomplete

Copy link
Copy Markdown
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.)

@HansMuller

Copy link
Copy Markdown
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
@Hixie

Hixie commented Jun 15, 2016

Copy link
Copy Markdown
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.

@mpcomplete
mpcomplete merged commit 02a4483 into flutter:master Jun 16, 2016
@mpcomplete
mpcomplete deleted the appbarheight branch June 16, 2016 21:24
cdotstout pushed a commit to cdotstout/flutter that referenced this pull request Apr 3, 2018
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants