title: Why the Hero Widget doesn't work in Flutter?
body: <p>I'm developping a Flutter app with the GetX state manager.<br />
  I have 2 screens and I want a hero animation between them.<br />
  Here is my hero widget, I use it in my 2 screens (exactly the same) :</p>
  <pre class="lang-dart prettyprint-override"><code>Widget heroTest() {
    timeDilation = 2; // This solution doesn't work
    return Hero(
        tag: &quot;test-hero&quot;,
        child: Image.asset(
          &quot;assets/google_logo.png&quot;,
          width: 100,
        ));
  }
  </code></pre>
  <p>To navigate between my screens, I use the GetX navigation way. I use a constant ID to keep the bottom navbar of my app. Even if I delete the ID, the Hero animation doesn't appear.</p>
  <pre class="lang-dart prettyprint-override"><code>void openDetails(MatchModel match) {
      Get.to(
        () =&gt; DetailsMatchPage(
          match: match,
        ),
        id: MyRouter.keys[&quot;HOME&quot;],
      );
    }
  </code></pre>
  <p>Here is the code of my Screen 1</p>
  <pre class="lang-dart prettyprint-override"><code>@override
    Widget build(BuildContext context) {
  
      return Navigator(
          key: Get.nestedKey(MyRouter.keys[&quot;HOME&quot;]),
          onGenerateRoute: (settings) =&gt; MaterialPageRoute(
              builder: (_) =&gt; Scaffold(
                  appBar: homeAppBar(),
                  body: SingleChildScrollView(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Carousel(),
                        heroTest(), // &lt;- My hero widget
                      ]).....);
  </code></pre>
  <p>And my screen 2</p>
  <pre class="lang-dart prettyprint-override"><code>@override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: appbar(),
        body: SingleChildScrollView(
          child: Column(
            children: [
              heroTest()
            ],
          ),
        ),
      );
    }
  </code></pre>
  <p>I navigate thought my screens with the <code>openDetails()</code> method mentionned just before</p>
  <h1>Env</h1>
  <p>The problem appears with my iPhone 12 Pro Max emulator
  The flutter doctor :</p>
  <pre class="lang-sh prettyprint-override"><code>Doctor summary (to see all details, run flutter doctor -v):
  [✓] Flutter (Channel stable, 2.0.1, on macOS 11.2 20D64 darwin-arm, locale fr-FR)
  [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
  [✓] Xcode - develop for iOS and macOS
  [✓] Chrome - develop for the web
  [✓] Android Studio (version 4.1)
  [✓] Android Studio (version 4.1)
  [✓] VS Code (version 1.54.1)
  [✓] Connected device (2 available)
  
  • No issues found!
  </code></pre>