When I try to use the Hero animation to transition between two times the same widget, but one is limited through his parents on its size, the animation does scale down on return even though it should scale up.
It always scales to the last recorded size when the second screen was pushed. Whether this is because the Hero Animation saves the source heros size or, the initial screen does render earliest when the hero is at its origin place and size, I don't know.
Thus my question if you know a way to fix this behavior, or if this might be an unexpected behavior of the Hero widget and I should post a flutter issue.
Setup:
- ValueNotifier is used to listen to changes and rebuilds both widgets (as they are literally the same)
- plus button adds element to valueNotifier and calls notifyListeners
- minus button removes last element element to valueNotifier and calls notifyListeners
Steps to reproduce:
- start dartpad.dev
- click arrow right fab
- add as many entries with the plus button, so the widget with the white background is higher than before
- click the arrow left button in the top left corner
- watch the animation resize, even though the widgets should be rebuild at the same time
