简体   繁体   中英

Flutter's Hero Transition above the other

I have two screens with 2 heroes between them:

  • One is the AppBar
  • The second is a CircularAvatar

Both are inside a stack, and obviously the CircularAvatar is above the Appbar.

This gif shows the problem: realize how the CircularAvatar comes from behind the AppBar and then POPS above it when the transition is done.

在此处输入图片说明

This is my first screen (containg the cards with people photos): 在此处输入图片说明

This is my second screen: 在此处输入图片说明

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [versão 10.0.17763.379], locale pt-BR)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] IntelliJ IDEA Community Edition (version 2018.3)
[√] VS Code (version 1.30.1)
[√] Connected device (1 available)

• No issues found!

首先,我认为 AppBar 中的英雄不需要它,请尝试删除该英雄,然后让您的 gridview 英雄跳转到位于第二个屏幕 Appbar 中的下一个位置。

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