[英]Is there any way to prevent Hero transition on specific routes?
we give same tags to Hero widgets and watch their transition between route transitions.我们为 Hero 小部件提供相同的标签,并观察它们在路由转换之间的转换。 I want to prevent specific Hero tag between specific routes.
我想阻止特定路线之间的特定英雄标签。 Is there any solution for this?
有什么解决办法吗? Can I say don't animate between this specific routes like this?
我可以说不要在这样的特定路线之间设置动画吗?
Example:例子:
HeroControllerScope(
controller: HeroController(
excludedRoutes: [Routes.BOOKING_SUMMARY, Routes.SUPER_PRODUCTS],
),
//lorem ipsum image
child: Hero(
child: Image.network('https://i.picsum.photos/id/184/200/300.jpg'),
),
)
use class HeroMode使用class 英雄模式
HeroMode(
enabled: Get.currentRoute != Routes.BOOKING_SUMMARY && Get.currentRoute != Routes.SUPER_PRODUCTS,
child: Hero(
child: Image.network('https://i.picsum.photos/id/184/200/300.jpg'),
),
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.