简体   繁体   English

Flutter 的英雄过渡高于其他

[英]Flutter's Hero Transition above the other

I have two screens with 2 heroes between them:我有两个屏幕,它们之间有 2 个英雄:

  • One is the AppBar一个是 AppBar
  • The second is a CircularAvatar第二个是圆形头像

Both are inside a stack, and obviously the CircularAvatar is above the Appbar.两者都在一个堆栈中,显然 CircularAvatar 位于 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.此 gif 显示了问题:了解 CircularAvatar 是如何从 AppBar 后面出现的,然后在转换完成后弹出它上面。

在此处输入图片说明

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 中的下一个位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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