getx icon indicating copy to clipboard operation
getx copied to clipboard

Hero - Router

Open nagringapp opened this issue 3 years ago • 4 comments

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

nagringapp avatar Aug 09 '21 11:08 nagringapp

Please, insert a reproduce code

jonataslaw avatar Aug 10 '21 00:08 jonataslaw

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.

iresharma avatar Sep 29 '21 00:09 iresharma

Any fix for this?

ibrahimcaj avatar Jun 25 '23 15:06 ibrahimcaj

Getx breaks the rescue behavior from the InheritedWidget context where Hero works. I solved it by migrating all my routes to Flutter default Navigator.

fabianogadenz avatar May 02 '24 00:05 fabianogadenz