简体   繁体   中英

Does a Hero widget rebuild its child after transition

The flutter docs do not mention whether the Hero widget rebuild its child after the widget is placed onto the destination screen from the overlay.

Also is the state retained?

Hero animations work with having two separate widgets wrapped in hero widgets having a same tag. Tag helps to identify the widgets to be animated but they are two separate widgets and hence created separately.

So, yes destination widget is created separately during the animation process and so the state is not retained.

I hope it clarifies it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM