Join GitHub today
hiding original hero after hero transition #37341
If you transition for route 1 to route2, the hero in route1 is hidden during the transition and reappear after transition end. This is generally ok when route2 is not transparent, but looks weird when it is transparent.
after this pr it will hide the original hero
I added the following tests:
"Heroes animate should hide original hero"
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
Does your PR require Flutter developers to manually update their apps to accommodate your change?
goderbauer left a comment
I am not sure if anybody depends on those heroes becoming visible again, but for those people, this will be a nasty breaking change. Nasty, because their app will just compile fine and run without exceptions. It'll be hard for them to notice that something is broken. Again, I can't think of any reason for anybody to depend on the fact that the heroes in the route below become visible again, but if we want to do this as a breaking change, we should collect feedback by sending out a breaking change proposal and giving people some time to respond. The breaking change should also be clearly stated in the PR description.
We could also make this a non-breaking change by just having it as a config option on the hero and defaulting it to the current behavior.
I am struggle on whether to keep the original behavior. I think if we want to provide options, they will be either the fromHero is always displayed or the always hidden. The current behavior is just weird and ugly.