getx
getx copied to clipboard
Hero - Router
Describe the bug Trying to use Hero when navigating to a detailed page
**Reproduction code Parentn Widget:
return Hero(
tag: 'post',
child: Container(
height: 200,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fitWidth,
image: NetworkImage(post.picture!),
),
)
)
);
Subpage:
return Hero(
tag: 'post',
child: Container(
height: 200,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fitWidth,
image: NetworkImage(this.post!.picture!),
),
)
)
);
Expected behavior Hero should work out of the box.
Flutter Version: Enter the version of the Flutter you are using
Getx Version: Enter the version of the Getx you are using
environment: sdk: ">=2.12.0 <3.0.0"
dependencies: flutter: sdk: flutter
The following adds the Cupertino Icons font to your application.
Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 get: ^4.3.4
Please, insert a reproduce code
hey, I think what @nagringapp was trying to say is the if we use Get.offNamed('/wf')
or any kind of routing using Gets, it ruins the hero animation.
Any fix for this?
Getx breaks the rescue behavior from the InheritedWidget context where Hero works. I solved it by migrating all my routes to Flutter default Navigator.