we give same tags to Hero widgets and watch their transition between route transitions. 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
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'),
),
)
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.